Delete Empty Sheets from excel workbook
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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)).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
The table structure is different, Sorry your solution did not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Fadi313, Yes it will have all the sheet headers as we are combining the data in a single table from all the sheets.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
there is no way to keep the correct header for each sheet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you a lot for your help and quick response.
Have a great day
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Fadi313, welcome. Glad it worked for you!
