Excel File Formats Explained: .xls, .xlsx, .xlsm, .xlsb — What's the Difference?

January 24, 2026 · 5 min read

Excel has four main file formats, and choosing the wrong one can silently delete your macros or cause compatibility problems. Here's what each format is, when to use it, and what the tradeoffs are.

FormatIntroducedEngineMax RowsVBA MacrosFile Size
.xlsExcel 97Binary (BIFF8)65,536✓ YesLarger
.xlsxExcel 2007Open XML1,048,576✗ NoSmaller
.xlsmExcel 2007Open XML1,048,576✓ YesSmall
.xlsbExcel 2007Binary XML1,048,576✓ YesSmallest

.xls — The Legacy Format

The binary Excel format used from Excel 97 through Excel 2003. It supports VBA macros, but is limited to 65,536 rows and 256 columns. The Jet database engine required to work with .xls files in certain contexts is deprecated and has unpatched security vulnerabilities on modern Windows.

When to use it: Never, for new files. For existing .xls files, migrate to .xlsx or .xlsm depending on whether macros are present.

.xlsx — The Modern Standard

The default Excel format since Excel 2007. Open XML format — files are actually ZIP archives containing XML. Supports 1,048,576 rows. Excellent compatibility across all modern Office versions, Google Sheets, and third-party tools.

Critical limitation: .xlsx cannot contain VBA macros. If you save a macro-containing file as .xlsx, Excel will warn you that VBA macros cannot be saved in this format — if you proceed, all VBA code is removed.

When to use it: Any workbook that doesn't have VBA macros.

.xlsm — The Macro-Enabled Standard

Identical to .xlsx except that it allows VBA code modules. The "m" stands for macro-enabled. Files are slightly larger than .xlsx but otherwise equivalent in compatibility and row limits.

When to use it: Any workbook that contains VBA macros. This is the correct migration target for .xls files with VBA. Not .xlsx.

Note: some email systems and cloud storage services block .xlsm files by default because they can contain executable code. If you need to share a file by email, be aware the recipient may need to adjust their security settings to open it.

.xlsb — The Binary XML Format

A hybrid format: it uses Open XML's row/column structure but stores data in binary rather than text XML. This makes .xlsb files significantly smaller and faster to open than .xlsx or .xlsm for large workbooks.

When to use it: Large workbooks (50MB+) where file size and open/save speed matter. Also useful for workbooks that are opened and closed frequently. Can contain VBA macros.

Tradeoff: .xlsb is less universally compatible — some third-party tools that read .xlsx don't support .xlsb. Google Sheets can't import .xlsb. Use it only for internal files, not for sharing.

The Migration Decision Tree

If you're converting a .xls file:

  1. Does the file contain VBA macros? (Check: Alt+F11, look for code modules) → If yes, save as .xlsm
  2. No macros, file is large (50MB+) and internal-only? → Consider .xlsb
  3. No macros, normal use? → Save as .xlsx

Not sure which format your files need?

LegacyLeaps scans each file, detects macro content, and saves to the correct format automatically — .xlsx or .xlsm as appropriate. Free scan to see what you've got.

Scan My Files

Related Resources

Get tips like this in your inbox

Practical fixes for legacy Excel and Access problems. No spam.

← Back to all posts