Excel Workbook Size Grows After Deleting Sheets: Fix
🔍 WiseChecker

Excel Workbook Size Grows After Deleting Sheets: Fix

You delete several sheets from an Excel workbook expecting the file size to shrink, but the file size stays the same or even gets larger. This happens because Excel does not immediately reclaim the space used by deleted sheets. The workbook’s internal structure retains remnants of removed data, custom formatting, and unused styles. This article explains why the file size increases and provides three proven methods to reduce the workbook size back to a normal level.

Key Takeaways: Fixing a Bloated Workbook After Deleting Sheets

  • File > Options > Add-ins > Manage COM Add-ins: Disabling unused add-ins can reduce file size by preventing residual data from being saved.
  • Home > Cells > Format > Delete Cells > Entire Sheet: Use the proper delete method to remove sheets and their underlying data structures.
  • File > Save As > Excel Binary Workbook (.xlsb): Saving in binary format compresses the file and eliminates leftover metadata.

ADVERTISEMENT

Why Deleting Sheets Does Not Shrink the Workbook

When you delete a sheet in Excel, the application marks the sheet’s data as removed but does not immediately release the disk space. The workbook file still contains the old data blocks, formatting definitions, style records, and named ranges that were stored in that sheet. Excel uses a structure similar to a database: deleting a row does not reclaim the space until the file is compacted. Additionally, if the deleted sheet contained conditional formatting rules, data validation, or custom number formats, those objects remain in the workbook’s XML or binary structure. Over time, repeated deletions and additions cause the file to bloat beyond its logical size.

Another common cause is the presence of unused cell styles. Excel copies style definitions from the deleted sheet into the workbook’s style collection. You might have dozens of unused styles that each take up a few bytes, but collectively they add significant overhead. The same applies to named ranges that reference the deleted sheet. The workbook retains these definitions even though they are no longer valid.

Steps to Reduce Workbook Size After Deleting Sheets

Follow these steps in order. Start with Method 1 and proceed only if the file size remains unchanged.

Method 1: Save a Copy and Use Binary Format

  1. Open the bloated workbook
    Launch Excel and open the file that grew after you deleted sheets.
  2. Go to File > Save As
    Click File, then Save As. Choose a location such as your desktop.
  3. Select Excel Binary Workbook (.xlsb)
    In the Save as type dropdown, choose Excel Binary Workbook (.xlsb). Do not choose Excel Workbook (.xlsx).
  4. Click Save
    Excel will rewrite the file using a compact binary format. This removes most residual data from deleted sheets.
  5. Compare file sizes
    Right-click the original .xlsx file and the new .xlsb file in File Explorer. Select Properties and compare the Size and Size on disk values. The .xlsb file should be significantly smaller.

Method 2: Remove Unused Styles and Named Ranges

  1. Open the workbook
    Open the file that still has a large size after saving as .xlsb.
  2. Press Alt+F11 to open the VBA editor
    This opens the Microsoft Visual Basic for Applications window.
  3. Insert a new module
    In the menu, click Insert > Module. A blank code window appears.
  4. Paste the style removal code
    Copy and paste the following code into the module:
    Sub RemoveUnusedStyles()
        Dim st As Style
        For Each st In ThisWorkbook.Styles
            If Not st.BuiltIn Then
                st.Delete
            End If
        Next st
    End Sub
    
  5. Run the macro
    Press F5 while the cursor is inside the macro. All custom styles that are not built-in will be deleted.
  6. Delete orphaned named ranges
    Press Ctrl+F3 to open the Name Manager. Look for any named ranges that reference the deleted sheet. Select each one and click Delete.
  7. Save the workbook
    Go to File > Save. The file size should now be smaller.

Method 3: Use the Inquire Add-in to Clean the Workbook

  1. Enable the Inquire add-in
    Go to File > Options > Add-ins. In the Manage dropdown, select COM Add-ins and click Go. Check Microsoft Inquire and click OK.
  2. Open the workbook
    Open the file you want to clean.
  3. Go to the Inquire tab
    Click the Inquire tab on the ribbon. If you do not see it, restart Excel.
  4. Click Clean Excess Cell Formatting
    In the Workbook Analysis group, click Clean Excess Cell Formatting. A dialog asks which sheets to clean. Select all sheets and click OK.
  5. Save the workbook
    Press Ctrl+S to save. The tool removes unused formatting that bloats the file.

ADVERTISEMENT

If the Workbook Size Still Grows After Cleaning

Excel Adds Hidden Data When You Delete Sheets

When you delete a sheet, Excel sometimes creates a hidden copy of the sheet’s data in the workbook’s Undo stack. To clear this, save the workbook, close it, and reopen it. The Undo stack is cleared on close, which frees that space. If the file size is still large, use Method 2 to remove styles.

The Workbook Contains External Links to Deleted Sheets

If the deleted sheet had formulas that referenced another workbook, those links remain in the workbook even after the sheet is gone. Go to Data > Edit Links. If any links appear, click Break Link. Then save the workbook.

PivotTable Cache Is Not Removed

Deleting a sheet that contained a PivotTable does not delete the PivotTable cache. The cache remains in the workbook and can be large. To remove it, right-click any remaining PivotTable, select PivotTable Options, go to the Data tab, and turn off Save source data with file. Then delete the PivotTable. Save the workbook.

Save As XLSX vs Save As XLSB: Key Differences

Item Save As XLSX Save As XLSB
Format type Open XML (compressed ZIP) Binary (proprietary)
File size after deleting sheets Often retains residual data Removes most residual data
Open speed Slower for large workbooks Faster for large workbooks
Compatibility Widely compatible with other tools Limited to Excel 2007 and later
Macro support Cannot store macros Can store macros

After applying one or more of these methods, you should see a noticeable reduction in file size. Start with the Save As XLSB method because it is the quickest and requires no VBA knowledge. If the file size is still too large, run the macro to delete unused styles and then use the Inquire add-in to clean excess formatting. As an advanced tip, periodically run the Clean Excess Cell Formatting tool even when you are not deleting sheets to prevent bloat from accumulating.

ADVERTISEMENT