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
navya m 23navya m 23 

Export List of records from Lightning page to excel on click of a button

Hi,
Can we export list of records from a lightning page to Excel sheet on click of button?In VF pages we use ContentType ,how can we do the same in Lightning?

Thanks in advance
Anthony GaillardAnthony Gaillard
Hi navya, we have the same issue did you find any solution ?
JustAGirlyGeekJustAGirlyGeek
Has anyone had any success with this?
sowmya Inturi 9sowmya Inturi 9
Hi,
http://sfdcmonkey.com/2017/04/19/download-csv-file-data-salesforce-lightning-component/
This link gives the detailed description of how to export list of records from lightning page.
 
ChaitanyaM07ChaitanyaM07
Hi,
   Please try the following link. 

http://www.vinaychaturvedi.com/blog/select-and-export-records-in-lightning-component/

Please upvote my answer if this is helpful to you. Thanks
Amol DixitAmol Dixit
If you are looking for "Export to Excel" in Lightning Web components, you can check out the below.

https://salesforcelightningwebcomponents.blogspot.com/2019/09/salesforce-export-to-excel-with.html
farukh sk hdfarukh sk hd
How to Download data in csv format using Lightning component.

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
 
Talha SaqibTalha Saqib
Hi.

I have written this guide that does exactly what you need (generating an excel file on click of button): https://retrology.net/how-to-generate-excel-file-in-aura-component-of-salesforce/