XLB vs XLSB vs XLSM vs XLSX: Complete Excel Format Guide
Excel’s filename extensions look like alphabet soup: .XLSX, .XLSM, .XLSB, .XLB. What’s the difference? When should you use each? And crucially—does it affect your file size, speed, or ability to share files?
This comprehensive guide breaks down all four formats so you can choose the right one for your situation.
Quick Comparison Table
| Format | Full Name | Contains Macros? | File Structure | Speed | File Size | Compatibility | Best For |
|---|---|---|---|---|---|---|---|
| .XLSX | Excel Workbook | No (macros stripped) | XML-based (zip) | Standard | Standard | Universal – works with most software | Sharing files, general use, cross-platform |
| .XLSM | Excel Macro-Enabled Workbook | Yes (VBA macros) | XML-based (zip) | Standard | Standard | Excellent – works everywhere XLSX does | Files with macros, shared across teams |
| .XLSB | Excel Binary Workbook | Yes (VBA and XLM macros) | Binary format | 2-4x faster | 20-50% smaller | Limited – mainly Excel and compatible tools | Large files, complex models, internal use |
| .XLB | Excel UI Customization / AutoRecover | Not applicable | Binary format | N/A | N/A | Excel only | Custom toolbars/ribbons, backup files |
Understanding Each Format
1. XLSX – Excel Workbook (The Standard)
What it is:
XLSX is the default Excel format introduced in 2007. It’s XML-based, meaning the file is actually a compressed ZIP folder containing XML files that describe your data, formulas, formatting, and structure.
How it works:
- Your spreadsheet is broken into XML components (workbook.xml, worksheet.xml, styles.xml, etc.)
- These XML files are zipped together into a single .XLSX file
- Excel unpacks, reads, and repacks this structure every time you open and save
Strengths:
- Universal compatibility: Works with Excel, Google Sheets, LibreOffice, Numbers, and countless other tools
- Safer: XML structure is easier to repair if the file gets corrupted
- Open standard: Anyone with a ZIP tool can inspect the file structure
- Security: Macros are automatically stripped (prevents malicious code)
- Industry standard: Expected format for file sharing, compliance, audits
Weaknesses:
- Cannot contain macros: If you save an XLSM as XLSX, all VBA macros are lost
- Slower for large files: XML unpacking/repacking adds overhead
- Larger file sizes: Verbose XML format takes more disk space than binary
Best practices:
- Use for any file you share with others (especially outside your organization)
- Use for reports, datasets, templates that don’t require automation
- Use as your “archive” format for long-term storage
Common misconception:
Myth: “XLSX files can’t have macros.”
Truth: XLSX files cannot store macros. If you try to save a macro-enabled file as XLSX, Excel will ask you to save it as XLSM instead, or it will strip the macros. This is by design for security.
2. XLSM – Excel Macro-Enabled Workbook
What it is:
XLSM is identical to XLSX in structure—also XML-based and compressed—but with one critical difference: it can store VBA macros.
When you create or edit a macro in Excel and try to save the file, Excel prompts you: “Save as XLSM to preserve macros, or as XLSX and lose them?”
How it works:
- Same XML-based, ZIP-compressed structure as XLSX
- Additionally contains a “vbaProject.bin” file inside the ZIP that stores your VBA code
- Macros run when the file opens (with security warnings if necessary)
Strengths:
- Preserves macros: All your VBA automation stays in the file
- Great compatibility: Works on Windows, Mac, in Excel Online (with limitations), and most third-party tools
- Standard macro format: Industry default for sharing macro-enabled workbooks
- Easily identified: The .XLSM extension immediately tells you the file has macros
- Flexible: You can easily convert between XLSM and XLSX (though you lose macros in the conversion)
Weaknesses:
- Security risk: Macros can contain malicious code; users must enable macros to run them
- Slower than XLSB: Still XML-based, so same performance limitations as XLSX
- Larger than XLSB: Binary format (XLSB) is more compact
Best practices:
- Use for macro-enabled files you share with colleagues or teams
- Use for templates with built-in automation
- Use for internal tools, calculators, and dashboards with VBA
Security note:
When you open an XLSM file, Excel shows a security warning: “Macros have been disabled.” Users must click “Enable Content” to allow macros to run. This is intentional—it prevents unknown malicious macros from running silently.
3. XLSB – Excel Binary Workbook
What it is:
XLSB uses binary format instead of XML, which means data is stored in a compressed binary representation that computers can read much faster.
Think of XLSX as a book written in English (readable by humans but verbose), and XLSB as a shorthand code (hard for humans to read but lightning-fast for computers).
How it works:
- Data is stored in binary format (0s and 1s) optimized for speed
- No XML parsing required – Excel reads binary data directly into memory
- Supports all Excel features including macros (both VBA and legacy XLM macros)
- Compressed to minimize file size
Strengths:
- Much faster: 2-4x faster to open and save, especially for large files
- Smaller file sizes: 20-50% smaller than XLSM/XLSX equivalents
- Better for large datasets: Handles complex calculations and millions of cells efficiently
- Macro support: Supports both VBA and legacy XLM macros
- Less corruption-prone: Binary format is more stable during save/load cycles in some scenarios
- Real-world performance: Testing shows .XLSX loads 4x longer than .XLSB and saves 2x longer
Weaknesses:
- Limited compatibility: Not all third-party tools support XLSB (Google Sheets, LibreOffice have limited support)
- Harder to repair: If corrupted, binary format is tougher to fix than XML
- Less portable: Should stay within Microsoft Excel ecosystem
- No macro-free version: All XLSB files can contain macros; there’s no way to guarantee a file is macro-free
Best practices:
- Use for large financial models or data analysis files (especially 10+ MB)
- Use internally within organizations that use Excel exclusively
- Use for performance-critical files (complex formulas, large datasets, frequent recalculations)
- Use for files you control and maintain—not for external distribution
Performance reality check:
When to actually use XLSB:
- XLSB file is 10-50 MB: The speed advantage becomes very noticeable
- You open/close the file 50+ times daily: Seconds saved per open add up
- File contains complex array formulas or pivot tables: Binary calculations are faster
- You’re sharing files only within your company: No third-party tool compatibility issues
But for typical 2-5 MB workbooks, the practical difference is negligible.
4. XLB – Excel UI Customization / AutoRecover File
What it is:
XLB is not a workbook format—it serves a completely different purpose. XLB files store:
- Custom toolbar and ribbon customizations (your saved UI layout)
- AutoRecover backups when Excel crashes unexpectedly
You don’t intentionally “create” an XLB file; Excel creates them automatically.
Two main uses:
1. Custom UI Settings
When you customize Excel’s ribbon or Quick Access Toolbar and export those customizations, Excel creates an .XLB file containing that configuration. You can later import this .XLB to apply the same setup on another computer.
2. AutoRecover Backup
If Excel crashes or loses power, it creates temporary .XLB backup files of your work. These appear in:
- Windows: C:\Users\[YourName]\AppData\Local\Microsoft\Office\UnsavedFiles
- Mac: ~/Library/Application Support/Microsoft/Office/
You can manually open these .XLB files to recover unsaved work.
Strengths:
- Disaster recovery: Recovers work lost to crashes
- Configuration portability: Share your ribbon setup with colleagues
Weaknesses:
- Only for Excel: XLB files are Excel-specific
- Temporary files: AutoRecover files are deleted after 4 days by default
- Not a workbook: You can’t use XLB as your primary file format
Best practices:
- Export your custom ribbon as .XLB before major system changes
- Check the AutoRecover folder immediately after a crash to recover unsaved work
- Enable AutoRecover to save backups every 1-2 minutes (Settings > Options > Save)
For more details on XLB files, see our complete guide: “How to Open XLB File in Excel”.
Decision Matrix: Which Format Should You Use?
Step 1: Does your file contain macros?
| Your Situation | Recommendation | Why |
|---|---|---|
| No macros, plan to share | → XLSX | Universal compatibility, standard format, secure |
| Has macros, will share | → XLSM | Industry standard for macro files, maintains compatibility |
| Has macros, internal use only, large file | → XLSB | Better performance, smaller size, no compatibility concerns |
| UI customization setup to export | → Export as XLB | Only way to save ribbon/QAT configuration |
Step 2: How large is your file?
- Smaller than 5 MB: File format makes minimal difference – use XLSX or XLSM
- 5-20 MB: XLSB starts showing speed advantages; consider it if internal only
- Larger than 20 MB: XLSB may be worth it; test both and compare open/save times
Step 3: Who needs access?
- External parties, partners, other software: Use XLSX or XLSM (everyone supports these)
- Internal team, Excel-only: XLSB is fine for performance files
- Long-term archiving: Use XLSX (most compatible, safest for future access)
Converting Between Formats
Converting XLSM → XLSX (Remove macros)
- Open the XLSM file
- Go to File > Save As
- In “Save as type” dropdown, select “Excel Workbook (.xlsx)”
- Click Save
- Excel warns: “Certain features may not be saved” – click Yes to confirm removal of macros
Result: New XLSX file is created, macros are deleted, formats/data preserved.
Converting XLSX → XLSM (Add macro capability)
- Open the XLSX file
- Go to File > Save As
- In “Save as type” dropdown, select “Excel Macro-Enabled Workbook (.xlsm)”
- Click Save
Result: New XLSM file is created (ready to receive macros if needed); original XLSX unchanged.
Converting XLSM → XLSB (Improve performance)
- Open the XLSM file
- Go to File > Save As
- In “Save as type” dropdown, select “Excel Binary Workbook (.xlsb)”
- Click Save
- Excel warns: “Certain features may not be saved” – click Yes
Result: New XLSB file is created with roughly 20-50% smaller file size; macros preserved; may lose some formatting in rare cases.
Converting XLSB → XLSM (Improve compatibility)
- Open the XLSB file
- Go to File > Save As
- In “Save as type” dropdown, select “Excel Macro-Enabled Workbook (.xlsm)”
- Click Save
Result: New XLSM file is created; opens in Google Sheets, LibreOffice, and other tools; file size increases 20-50%.
Real-World Performance Comparison
Test results from actual Excel files:
| File Size | Format | Open Time | Save Time | File Size on Disk |
|---|---|---|---|---|
| Generated worksheet (large dataset) | XLSX | 4.0 seconds | 2.0 seconds | 1.5x baseline |
| XLSB | 1.0 second | 1.0 second | 1.0x baseline | |
| Financial model (25 MB) | XLSM | 8-12 seconds | 6-10 seconds | 25 MB |
| XLSB | 2-3 seconds | 1-2 seconds | 15-18 MB |
Takeaway: For large files, XLSB saves 60-75% of open/save time and reduces file size by 20-40%.
Compatibility Matrix: Can You Open Format X in Tool Y?
| Format | Excel Windows | Excel Mac | Excel Online | Google Sheets | LibreOffice | Numbers (Mac) |
|---|---|---|---|---|---|---|
| XLSX | ✓ Full | ✓ Full | ✓ Full | ✓ Full | ✓ Full | ✓ Full |
| XLSM | ✓ Full (macros) | ✓ Full (macros) | ⚠ Partial (no macros) | ⚠ Partial (no macros) | ⚠ Partial (limited macros) | ✗ No |
| XLSB | ✓ Full | ✓ Full | ✗ No | ✗ No | ⚠ Limited | ✗ No |
| XLB | ✓ (config only) | ✓ (config only) | ✗ No | ✗ No | ✗ No | ✗ No |
Legend: ✓ Full = Full support | ⚠ Partial = Limited support | ✗ No = Not supported
Common Mistakes and How to Avoid Them
Mistake 1: “I saved my file as XLSX but the macro disappeared”
What happened: XLSX cannot contain macros. When you saved as XLSX, Excel stripped them out.
Solution: Use XLSM instead if you need to keep macros.
Mistake 2: “My colleague can’t open my XLSB file”
What happened: Your colleague might be using an older Excel version or a non-Microsoft tool that doesn’t support XLSB.
Solution: Convert to XLSM for sharing. Use XLSB only for internal files.
Mistake 3: “I thought XLSB would make my file faster, but I don’t notice any difference”
What happened: Your file is probably small (under 5 MB). XLSB speed advantages only become noticeable with larger files.
Solution: Use XLSM for smaller files; save XLSB for models larger than 10-15 MB.
Mistake 4: “I archived my files as XLSB, but now I can’t open them”
What happened: You’re trying to open XLSB in a tool that doesn’t support it, or a future version of Excel may have limited XLSB support.
Solution: Archive long-term files as XLSX (most compatible format for the future).
Summary: Quick Decision Guide
Use XLSX when: Sharing files externally, long-term archiving, no macros needed, compatibility is critical
Use XLSM when: File has VBA macros, sharing with colleagues, need industry standard macro format
Use XLSB when: Internal use only, file larger than 10 MB, performance is critical, organization uses Excel exclusively
Use XLB when: Exporting ribbon customizations or recovering from AutoRecover crashes (not a primary workbook format)
The Bottom Line
For most users, the choice is simple:
- Default to XLSX unless you need macros or extreme performance
- Use XLSM if your file contains macros
- Consider XLSB only if you’re working with very large files (20+ MB) and sharing within your organization only
- Don’t worry about XLB unless you’re managing custom ribbon settings or recovering from crashes
The format you choose affects file size, speed, compatibility, and security. Choose wisely based on your actual use case, not just what you think is “fastest” or “best.”


