You need to sign in to do that
Don't have an account?
upen
Export Data to CSV file from Custom Object in salesfroce.
Hello,
I want to Export Data to CSV file from Custom object in Salesforce throug Apex Code.
It would be great that anybody provide some sample code.
Thanks For Your Co-operation
This would create a document in a folder called Test with 10 contacts in it...
All Answers
This would create a document in a folder called Test with 10 contacts in it...
Using Visualforce, you could also create a page that sets the content-type to "text/csv" and output the results to the page; this will prompt the browser to save the file.
Thanks a lot BritishBoyinDC.
This sample of code is really very help full..
On my blog i have displayed some data to user, User will select the data that user wants to download from the displayed data. Once user select all those record which user wants to export user has to click on download data button and excel in the csv format will get download.
Also i have shown how to show data from related object in csv as well.
Please refer the below link.
https://www.sfdc-lightning.com/2019/10/export-to-csv-in-lightning-component.html