Excel guide · 5 min read
How to reduce Excel file size
Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | |
|---|---|---|---|
| 1 | Part inside the .xlsx | Size (KB) | Likely fix |
| 2 | xl/media (6 pictures) | 9840 | Compress pictures |
| 3 | xl/pivotCache (2 caches) | 4380 | Don't save source data |
| 4 | xl/worksheets/sheet1.xml (Orders) | 3120 | Delete the unused range |
| 5 | xl/sharedStrings.xml | 820 | Leave it |
| 6 | xl/styles.xml | 610 | Remove duplicate styles |
| 7 | xl/worksheets/sheet2.xml (Summary) | 46 | Leave it |
| 8 | Other parts | 35 | Leave it |
Download this sheet as an Excel practice file (.xlsx)
1. Find out what's taking the space
An .xlsx file is a zip folder of smaller files. Copy the workbook, rename the copy from .xlsx to .zip, and open it: Windows and macOS list the parts with their sizes. Pictures live in xl/media, each sheet's cells in xl/worksheets, pivot data in xl/pivotCache, and formats in xl/styles.xml. Delete the copy when you're done.
The table is that list for an 18 MB sales workbook. Before touching anything, rank the parts. Here the pictures alone are half the file, so compressing them beats any amount of tidying the formulas.
Result: xl/media (6 pictures)
xl/media (6 pictures): the single biggest part of this workbook.
2. Delete the used range Excel thinks you have
Excel saves every cell in the used range, from A1 to the last cell that has ever held content or formatting. Format a whole column, fill a formula too far, or paste and delete a big block, and the used range can stretch to row 1,048,576. Press Ctrl+End: if it lands far below or to the right of your data, that's waste.
Clearing those cells doesn't shrink the range. Deleting them does. In current Microsoft 365, Review > Check Performance finds formatted empty cells and can clean them up for you, if your version shows it.
- Click the row number below your last row of data, press Ctrl+Shift+Down, right-click and choose Delete.
- Click the column letter right of your last column, press Ctrl+Shift+Right, right-click and choose Delete.
- Repeat on each sheet, then save. Ctrl+End should now land at the end of your real data.
3. Compress the pictures
Photos pasted straight from a phone or a screenshot tool are often several megabytes each, far more detail than a sheet needs. Compress them all at once, and tell Excel to throw away the cropped-off parts it keeps by default.
For future pictures, go to File > Options > Advanced, Image Size and Quality: tick Discard editing data and pick a lower Default resolution. In this workbook, pictures are just over half of the file.
- Click any picture, then Picture Format > Compress Pictures.
- Untick Apply only to this picture so every picture is compressed.
- Tick Delete cropped areas of pictures and choose a resolution such as Web (150 ppi) or Email (96 ppi).
- Click OK and save.
Result: 0.52198822344 shows as 52% with Percent format
0.52: the six pictures are 52% of the file.
4. Stop saving pivot caches with the file
Every PivotTable keeps its own copy of the source data, the pivot cache, and saves it in the file. With a large source table, that's a second copy of the data, sometimes several. Right-click the pivot, choose PivotTable Options > Data, untick Save source data with file and tick Refresh data when opening the file. The file shrinks, and the pivot rebuilds its cache when opened.
Pivots built from the same range normally share one cache. Separate caches creep in when pivots point at slightly different ranges or at copies of the data, so point every pivot at one table (Ctrl+T) and each copy of the data is saved once.
5. Clean up formatting and conditional formatting
Copying and pasting rows duplicates conditional formatting rules, and after a few months a sheet can have hundreds of near-identical rules. Go to Home > Conditional Formatting > Manage Rules, set Show formatting rules for to This Worksheet, and delete the duplicates, keeping one rule per job that covers the whole range.
Formatting whole columns or rows by clicking the header is fine when you mean it, but formatting that was applied to the whole sheet "just in case" bloats the used range. Workbooks that have been copied between many files can also collect thousands of unused cell styles; if the Cell Styles gallery is full of names you never created, that's styles bloat.
6. Save as an Excel Binary Workbook (.xlsb)
File > Save As and choose Excel Binary Workbook (*.xlsb). It holds the same sheets, formulas, pivots and charts, stores them in a compact binary format, and is often noticeably smaller and quicker to open for big data sheets. It can also hold macros.
The catch: some other tools, such as certain online viewers, import scripts and older add-ins, can't read .xlsb. Keep .xlsx when you share the file outside Excel, and test that the people you send it to can open it.
7. Smaller wins worth a minute
Turn finished formulas into values: last year's months won't change, so copy those cells and paste them as values. Delete sheets nobody uses, including hidden ones (right-click a tab > Unhide to see them). Remove broken and unused names in Formulas > Name Manager. Break links to other workbooks you no longer need in Data > Edit Links (Workbook Links in newer versions).
Keyboard shortcut: Find the last used cell: Ctrl+EndDelete rows: Ctrl+Minus
Common mistakes
Zipping the .xlsx to make it smaller
An .xlsx is already zip-compressed, so zipping saves almost nothing. Fix what's inside instead.
Clearing contents instead of deleting rows
Delete the unused rows and columns, then save, so the used range actually shrinks.
Saving as the old .xls format
.xls is limited to 65,536 rows and loses newer features. Use .xlsx or .xlsb.
Unticking Save source data without turning on refresh
Tick Refresh data when opening the file too, or the pivot opens without data to filter.
FAQ
Why is my Excel file so large with little data?
The used range probably stretches far beyond the data, or the file holds pictures or pivot caches. Press Ctrl+End to check, delete the unused rows and columns, and save.
Does .xlsb make Excel files smaller?
Usually, often by a good margin for large data sheets, and they tend to open faster. Check that everyone who gets the file can open .xlsb first.
How do I see what is making my Excel file big?
Copy the file, rename the copy to .zip and open it. The sizes of xl/media, xl/worksheets and xl/pivotCache show where the space goes.
Do formulas make an Excel file bigger?
A little, since each formula is stored, but rarely as much as pictures, pivot caches or an oversized used range. Formulas mainly cost calculation time.
Functions used
Related guides
- Pivot table not working: 7 fixes
- How to remove blank rows in Excel
- Excel cannot insert row: how to fix it
- How to create a pivot table in Excel
- How to calculate shipping cost by weight in Excel
- How to calculate a weighted score in Excel
Updated