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
Yadhagu LYadhagu L 

Create multiple sheets in single excel workbook using VF page while looping records

Need assistance on creating/adding/looping data in new excel worksheet but in same workbook(each record in seperate sheet, but need on single workbook). E.g. I have looped through 10 accounts, I need these selected data (fields) for each looped account in a new worksheet and at the end of execution the workbook should be download. I'll be using this functionality from list view page. 
SubratSubrat (Salesforce Developers) 
Hello Yadhagu ,

I cam across a discussion which might help you with your requiremrnt ,
requesting you to go through it -> https://salesforce.stackexchange.com/questions/212753/how-to-generate-multiple-excel-files-on-click-of-a-button-in-vf-page

If the above discussion helps , please mark this as Best Answer.
Thank you.
Yadhagu LYadhagu L

Hi Subrat,
Thanks for your time,

We have already tried this one but it's not working. Excel file is in corrupted format and not opening.