ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Comparisons
  3. XLSX vs XLSM vs XLS: Excel File Types Explained

XLSX vs XLSM vs XLS: Excel File Types Explained

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

XLSX is Excel's standard file format and cannot store macros. XLSM is the same format with VBA macros allowed, so use it only when the workbook has macros you need. XLS is the old Excel 97-2003 format, limited to 65,536 rows and 256 columns. For everyday work, save as XLSX.

Key takeaways

  • XLSX and XLSM are the same modern format; the only difference is that XLSM can hold VBA macros.
  • Saving a workbook with macros as XLSX removes the macros, after a warning.
  • XLS is the Excel 97-2003 format, with only 65,536 rows and 256 columns per sheet.
  • Files from other people that end in .xlsm can run code, so only enable macros from sources you trust.
  • Changing the extension by renaming the file doesn't convert it. Use Save As.
On this page+
  1. XLSX vs XLSM vs XLS at a glance
  2. What each file type is
  3. The same workbook saved three ways
  4. When to use XLSX
  5. When to use XLSM
  6. When to use XLS, and how to convert it
  7. Common mistakes with Excel file types
  8. Our recommendation
  9. Practise it

The short answer to XLSX vs XLSM: they are the same modern Excel format, but XLSM can store VBA macros and XLSX cannot. XLS is a third, older format from Excel 97-2003 that you should only use for very old software. This guide explains what each file type keeps and loses, so you can pick the right one when you save, share or receive a workbook.

XLSX vs XLSM vs XLS at a glance#

XLSX is the default for good reason. Choose XLSM only for macros and XLS only for old systems.

FeatureXLSXXLSMXLS
Full nameExcel WorkbookExcel Macro-Enabled WorkbookExcel 97-2003 Workbook
Stores VBA macrosNoYesYes
Rows × columns per sheet1,048,576 × 16,3841,048,576 × 16,38465,536 × 256
IntroducedExcel 2007Excel 2007Excel 97
Format insideCompressed XMLCompressed XMLOlder binary format
Newer features (tables, new functions)KeptKeptSome lost or limited
Risk when opening from strangersLowerHigher (macros can run code)Higher (macros can run code)
Best forAlmost everythingWorkbooks with macrosVery old software only

What each file type is#

The letters after the dot tell Excel how the file is built and what it may contain.

  • XLSX (Excel Workbook) is the standard format since Excel 2007. Inside, it is a set of XML files packed into a ZIP archive, which keeps it small. It holds data, formulas, formatting, charts, tables and PivotTables. It can't hold VBA macros.
  • XLSM (Excel Macro-Enabled Workbook) is the same format plus a place to store VBA macros. A macro is a small program, written in Visual Basic for Applications, that repeats steps for you, like formatting a report or copying data between sheets.
  • XLS (Excel 97-2003 Workbook) is the old binary format. It can hold macros, but it has smaller sheets and doesn't support many features added since 2007.

You may also meet XLSB (binary workbook, which can hold macros and often opens faster for very large files), XLTX and XLTM (templates without and with macros) and CSV (plain text, one sheet, no formulas). The CSV vs XLSX comparison covers CSV in detail.

The same workbook saved three ways#

Imagine a workbook with three sheets: Data with 100,000 rows, Summary with XLOOKUP formulas, and a macro that formats the report. Here is what happens when you save it in each format.

Save asWhat happens
XLSXExcel warns that the VBA project can't be saved in a macro-free workbook. If you click Yes, the data and formulas are kept, but the macro is gone.
XLSMEverything is kept: data, formulas and the macro.
XLSThe Compatibility Checker warns that rows beyond 65,536 will be lost and some features may not work in earlier versions.

In Excel for Windows, choose File > Save As, then pick the type in the Save as type list. On a Mac, choose File > Save As and pick it in the File Format list. The type you choose decides the extension. Renaming a file from .xlsm to .xlsx in your file explorer doesn't convert it, and Excel then refuses to open it with an error about the file format or extension.

When to use XLSX#

Use XLSX for every workbook that doesn't need macros. It is the safest and most widely accepted choice:

  • Sharing with colleagues and clients. Email filters and company systems accept XLSX, and people open it without a security warning.
  • Uploading to websites and apps. Most tools that import Excel files expect XLSX.
  • Reports, models and dashboards built with formulas. Formulas, tables, PivotTables, charts and conditional formatting all work in XLSX. None of them need macros.
  • Job tests and assessments. Unless the task says otherwise, save your answer as XLSX.

If you aren't sure whether a workbook has macros, save it as XLSX. Excel tells you if there is something it can't keep.

When to use XLSM#

Use XLSM only when the workbook contains VBA macros that you need to keep. Typical cases:

  • A button that runs a task, such as "Refresh report" or "Create PDF".
  • A tool that loops over many sheets or files, which formulas alone can't do.
  • Custom functions written in VBA that your formulas call.

When you open an XLSM file from someone else, Excel disables its macros and shows a yellow security bar. In current versions of Microsoft 365 on Windows, Excel goes further and blocks macros in files downloaded from the internet. This protects you, because a macro can do anything a program can. Only enable macros in files from people and places you trust.

If you recorded a macro to try it out and no longer need it, save the file as XLSX to remove it.

When to use XLS, and how to convert it#

Use XLS only when someone has to open the file in Excel 2003 or earlier, or when an old system can only read XLS. Otherwise, convert it.

When you open an XLS file in a modern Excel, the title bar shows Compatibility Mode. The sheet is still limited to 65,536 rows and 256 columns, and some newer features are turned off. To convert it, choose File > Info > Convert on Windows, or use File > Save As and pick Excel Workbook (.xlsx). Choose XLSM instead if the old file contains macros you need.

Converting can break links from other workbooks. A formula that points to another file includes the file name and extension, such as ='[Prices.xls]Sheet1'!B2. When Prices.xls becomes Prices.xlsx, that link still looks for the old name. Use Data > Edit Links > Change Source to point it at the new file. If the link breaks completely, you may see #REF!; the guide to fixing #REF! errors explains why. For links within one file, see how to reference another sheet.

Common mistakes with Excel file types#

These slips cause most file-type problems:

  1. Saving a macro workbook as XLSX. Excel warns you, but clicking Yes deletes the macros. Keep an XLSM copy first.
  2. Renaming instead of converting. Changing .xlsm to .xlsx by hand makes the file unreadable. Always use Save As.
  3. Saving everything as XLSM "just in case". XLSM files trigger warnings and may be blocked by email filters. Use XLSM only when there are macros.
  4. Keeping old XLS files in daily use. Large data gets cut at row 65,536, and newer functions may not work.
  5. Enabling macros in unknown files. If you didn't expect a macro, don't enable it.
  6. Confusing a file with a sheet. A file type applies to the whole workbook, not one sheet. If the terms are new, read workbook vs worksheet. To bring sheets from several files into one, see how to combine sheets.

Our recommendation#

Save as XLSX by default. It keeps everything formulas can do, opens without warnings and works everywhere. Switch to XLSM only when the workbook has VBA macros you want to keep, and tell people why the file asks them to enable content. Treat XLS as a legacy format: open old files, then convert them to XLSX.

In short: XLSX for almost everything, XLSM for macros, XLS only for very old software.

Practise it#

Most real workbooks, whatever their file type, link several sheets together. Practise working with multiple worksheets in a live spreadsheet: you write formulas that pull values from other sheets, and each step is checked instantly. Try the exercise on this page first: it counts the macro-enabled files in a list with one COUNTIF.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

How many files in the list are macro-enabled workbooks? In D2, use COUNTIF with a wildcard to count the file names in A2:A8 that end in .xlsm.

fx
ABCDE
1
File name
Owner
XLSM files
2
budget-2026.xlsx
Finance
3
payroll-macros.xlsm
HR
4
sales-q3.xlsx
Sales
5
old-prices.xls
Sales
6
report-tool.xlsm
Finance
7
export.csv
IT
8
forecast.xlsb
Finance
9
10
11

Tip: The * wildcard means any text. "*.xlsm" matches every name that ends in .xlsm.

Practise this in a lesson

LessonWorksheets and cross-sheet referencesSwitch, add and rename worksheet tabs, then use other sheets in formulas: Prices!B3, a lookup against a price list tab, and a total across monthly tabs.

Frequently asked questions

What is the difference between XLSX and XLSM?

+

Both use the same modern Excel format. XLSM can store VBA macros, and XLSX cannot. If a workbook has no macros, XLSX is the better choice.

Is XLSM safe to open?

+

The file itself opens like any workbook, but its macros can run code on your computer. Excel disables macros by default and shows a warning. Only enable them if you trust the sender.

Can I convert XLSM to XLSX?

+

Yes. Open the file, choose File > Save As, and pick Excel Workbook (*.xlsx). Excel warns that the macros will be removed; click Yes to continue.

Why can't I just rename .xlsm to .xlsx?

+

The file extension must match the content inside. If you rename the file, Excel shows an error that the file format or extension is not valid. Use Save As to change the type.

Should I still use the XLS format?

+

Only when someone must open the file in Excel 2003 or earlier, or in an old system that reads nothing else. XLS limits each sheet to 65,536 rows and 256 columns and drops newer features.

Sources

  • Create or change a cell reference - Microsoft Support
  • COUNTIF function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. XLSX vs XLSM vs XLS at a glance
  2. What each file type is
  3. The same workbook saved three ways
  4. When to use XLSX
  5. When to use XLSM
  6. When to use XLS, and how to convert it
  7. Common mistakes with Excel file types
  8. Our recommendation
  9. Practise it

Keep reading

Comparisons· 7 min read

CSV vs XLSX: Which File Format to Use

Use XLSX for any file people will work in: it keeps formulas, formatting, multiple sheets, tables and charts. Use CSV to move data between systems, because it is plain text that almost any program can read and write. CSV saves only values from one sheet, and opening it in Excel can strip leading zeros and change dates.

Comparisons· 6 min read

Workbook vs Worksheet in Excel: What's the Difference

A workbook is the whole Excel file, such as Budget.xlsx. A worksheet is one sheet inside that file, shown as a tab at the bottom of the window, with its own grid of rows, columns and cells. One workbook can hold many worksheets. You save, open and email workbooks; you type data and formulas on worksheets.

Data tools· 5 min read

Combine Data From Multiple Sheets in Excel

To combine data from multiple sheets in Excel, stack the ranges with VSTACK in Microsoft 365 or Excel 2024: =VSTACK(Jan!A2:C4,Feb!A2:C4) puts February's rows under January's and updates by itself. In older versions, use Power Query's Append command, or Data > Consolidate when you only need totals by label. For a one-off job, copy and paste.

More on comparisons

  • Accounting vs Currency Format in Excel
  • & vs CONCATENATE in Excel: Which Joins Text Better
  • AND vs OR in Excel: All Conditions or Any
  • AVERAGE vs AVERAGEA in Excel
  • AVERAGE vs MEDIAN: Which Tells the Truth?
  • AVERAGEIF vs AVERAGEIFS: Argument Order Matters
All comparisons articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free