function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DeepikareddyDeepikareddy 

How to Export the data to the txt file and csv file in salesforce

Hi..by using the Restapi, got the data form the External system and deserilaized the data and stored in the string.now i have
two command buttons  Export as textfile, and Export as Csv file. 
 1)when i click on the txt button need to save as txt.file.
2)when click on the Csv button need to save as Csv.file
Any suggestions to save the data on two command buttons in salesforce..How can i procced.
Thanks in advance 
Deepika...!
AbhishekAbhishek (Salesforce Developers) 
Hi DeepikaReddy,

Please go through the below articles which have complete information about your query.

https://douglascayers.com/2016/03/20/salesforce-easy-ways-to-export-data-as-csv/

https://help.salesforce.com/articleView?id=exporting_data.htm&type=5

https://help.salesforce.com/articleView?id=reports_export.htm&type=5

https://www.data2crm.com/migration/help/how-to-export-salesforce-accounts-csv-file/

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Regards,
Salesforce Support.
Michael TomarMichael Tomar
Hi there! Take a look at Skyvia - it allows us to export Salesforce data to CSV file: https://skyvia.com/data-integration/salesforce-csv-file-import-and-export
It is much easier method to solve this task