I have an excel workbook having 100 Sheets most of them are empty, wants to delete the empty sheets only and then send the updated workbook to my team.
Regards
Solved! Go to Solution.
Hey @Fadi313
Is the table structure the same throughout the file? Then you could load it in altogether, including the sheet name.
This would result in no lines for empty sheets and the input files being stacked on top of each other. Then you could write the output file directly, using the sheet names. You wouldn't get any empty sheets, as those have no rows in the Input file (at least I think so (otherwise you would need a simple filter)).
Hi
The table structure is different, Sorry your solution did not work.
Hi, @Fadi313 you can try it using a macro.
Input sheet names from the file.
Macro Output will remove the empty sheets. In my case sheet3 and sheet4 are empty. Then you can update your workbook using the output tool.
I hope this will solve your purpose.
Thanks!
Hi Sapna,
Thank you for your reply , the empty sheets have been removed but each sheet in the output workbook have all sheets headers.
Thank you
@Fadi313, Yes it will have all the sheet headers as we are combining the data in a single table from all the sheets.
Thanks!
there is no way to keep the correct header for each sheet
@Fadi313, there is one way but in that case you will have to create a new workbook and copy the sheets in that.
But in that case, you will have to change the filename every time and create a separate file for all the workbooks.
I have simply added an output tool in the macro which will read the sheet one by one and will keep creating a new sheet in your new workbook.
Posting the updated workflow.
I hope this helps!
Thanks!
Thank you a lot for your help and quick response.
Have a great day
@Fadi313, welcome. Glad it worked for you!