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

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 ?
Has anyone had any success with this?
sowmya Inturi 9sowmya Inturi 9
This link gives the detailed description of how to export list of records from lightning page.
   Please try the following link.

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

I have written this guide that does exactly what you need (generating an excel file on click of button):