Excel File Extensions Explained: XLSX vs XLS vs XLSM vs CSV – LicenceHouse guide

The standard Excel file extension is .xlsx, the default workbook format since Excel 2007. Use .xlsm when the workbook contains macros, .xls only for Excel 97-2003, and .csv for plain data you want to move between programs. Choose the format in File > Save As under "Save as type".

Extension Format name in Excel Macros? Use it for
.xlsx Excel Workbook No Everyday workbooks (the default)
.xlsm Excel Macro-Enabled Workbook Yes Workbooks with VBA macros
.xlsb Excel Binary Workbook Yes Very large files that need to open and save quickly
.xls Excel 97-2003 Workbook Yes Sharing with very old versions of Excel
.xltx / .xltm Excel Template / Macro-Enabled Template No / Yes Reusable starting files
.xlam Excel Add-in Yes Distributing custom functions and tools
.csv CSV (Comma delimited) / CSV UTF-8 No Plain data for other apps and databases
.txt Text (Tab delimited) / Unicode Text No Tab-separated plain data
.ods OpenDocument Spreadsheet No Opening in other spreadsheet programs
.pdf PDF No Read-only sharing and printing

What is the file extension of a Microsoft Excel file?

A normal Excel file ends in .xlsx. Every version from Excel 2007 onwards, including Excel 2016, 2019, 2021, 2024 and Microsoft 365, saves new workbooks as .xlsx unless you choose otherwise. The format is a compressed package of XML files, which keeps file sizes small and makes damaged files easier to recover.

The one thing .xlsx cannot hold is VBA macro code. If you add a macro and try to save as .xlsx, Excel warns you that the code will be removed. Save as .xlsm instead. Our guide to what a macro is in Excel explains when you would need one. Microsoft's full list of file formats supported in Excel covers rarer types too.

If you cannot see extensions at all, Windows is hiding them. In File Explorer on Windows 11, choose View > Show > File name extensions. On Windows 10, open the View tab and tick File name extensions.

What is the difference between XLSX and XLS?

XLSX is the modern XML-based format; XLS is the older binary format used by Excel 97-2003. The differences matter more than people expect:

Comparison table of XLSX vs XLS: 1,048,576 vs 65,536 rows, 16,384 vs 256 columns, macros, newer features and file size.

Feature .xlsx .xls
Rows per sheet 1,048,576 65,536
Columns per sheet 16,384 (to XFD) 256 (to IV)
Macros Not allowed (use .xlsm) Allowed
Newer features (tables, slicers, new functions) Supported Lost or converted when saved
Typical file size Smaller Larger

When you open an .xls file in current Excel, the title bar shows Compatibility Mode. To upgrade it, go to File > Info > Convert. Excel saves an .xlsx copy and unlocks the full grid. Saving the other way, from .xlsx down to .xls, runs the Compatibility Checker, which lists what will be lost. Anything beyond row 65,536 or column IV is not saved.

What we commonly see: a workbook that "won't take more rows" or keeps dropping data is still an .xls file opened in Compatibility Mode. Convert it once and the problem disappears.

How do I save Excel as CSV?

Go to File > Save As (or File > Save a Copy if AutoSave is on), pick a folder, open the Save as type list and choose CSV UTF-8 (Comma delimited) (*.csv). Click Save.

Steps to save an Excel sheet as CSV UTF-8 (Comma delimited) using File > Save As, one active sheet at a time.

  1. Click the sheet you want to export. CSV saves only the active sheet.
  2. Choose File > Save As or Save a Copy.
  3. Select CSV UTF-8 (Comma delimited) for text with accents, symbols or non-English characters. Choose CSV (Comma delimited) only if the receiving system asks for it.
  4. Click Save. If Excel warns that only the current sheet will be saved, click OK.
  5. Repeat for each sheet you need as a separate CSV.

Keep your original as .xlsx. A CSV keeps values only: formulas become their results, and formatting, charts, extra sheets and macros are dropped. Microsoft walks through the same export in its article on importing or exporting text and CSV files.

Advanced nuance: the separator Excel writes depends on your Windows regional settings. In many European locales the list separator is a semicolon, so a "comma delimited" CSV actually contains semicolons. If another system rejects your file, check the list separator in Windows region settings, or export from a machine set to a comma-based locale.

How do I convert a text file to Excel?

Use Data > From Text/CSV. It reads .txt, .csv and .prn files, detects the separator and shows a preview before loading the data into a sheet.

  1. Click the cell where the data should start, or open a new workbook.
  2. Go to Data > Get & Transform Data > From Text/CSV.
  3. Select the file and click Import.
  4. Check the Delimiter (comma, tab, semicolon and so on) in the preview.
  5. Click Load, or Load To to choose where the data goes. Choose Transform Data first if you need to change column types.
  6. Save the result with File > Save As as an Excel Workbook (.xlsx).

You can also go to File > Open, set the file type to Text Files, and open the file. A .txt file starts the Text Import Wizard; a .csv opens straight into a new workbook using default settings.

If the text is already pasted into one column, select it and use Data > Text to Columns to split it by a delimiter or fixed width.

Example: protecting leading zeros

Product codes and phone numbers often lose their leading zeros on import, because Excel treats them as numbers.

In the text file Default import Imported as Text
00721 721 00721
0207 946 0000 0207 946 0000 0207 946 0000
1-10 A date (01-Oct) 1-10

To keep values exactly as written, choose Transform Data, select the column, and set Data Type to Text before you load.

Which extension should I use when I save?

Stay on .xlsx unless you have a reason not to. Pick another format when:

Table of when to use each Excel file extension: .xlsx default, .xlsm for macros, .xlsb for large files, .csv, .ods and .pdf.

  • .xlsm: the workbook includes macros or VBA buttons.
  • .xlsb: the file is very large and slow to save. The binary format is usually smaller and faster, and it can hold macros, but other programs read it less often.
  • .csv: you are uploading to a website, an accounting system or a database.
  • .ods: the recipient uses a free spreadsheet program. Some formatting can be lost; our comparison of free Office alternatives and Microsoft Office explains where.
  • .pdf: people only need to read or print the sheet. Set the print area and headers and footers first so the PDF looks right.

Do file formats differ between Excel versions?

No. Excel 2016, 2019, 2021, 2024 and Microsoft 365 all use the same .xlsx, .xlsm and .xlsb formats, so files open across versions on Windows and Mac. What differs is the functions inside the file. A workbook built with XLOOKUP or FILTER in Excel 2021 or later opens in Excel 2016, but those formulas return #NAME? when recalculated there.

If you share files with colleagues on several versions, it helps to standardise. Our Office versions comparison sets out what each release adds, and the Office 2024 collection lists the current perpetual editions that read and write every format in the table above.

Frequently asked questions

Can I just rename a file from .xls to .xlsx?

No. Renaming changes only the label, not the contents, so Excel will warn that the format and extension do not match, or refuse to open the file. Open the workbook in Excel and use File > Info > Convert, or File > Save As and choose Excel Workbook (.xlsx). The same applies to turning .csv into .xlsx.

Why does Excel say "the file format or file extension is not valid"?

The file's real contents do not match its extension, or the file is damaged or only partly downloaded. Try opening it through File > Open and choosing Open and Repair from the Open button's drop-down. If the file came from a website or email, download it again. Files renamed by hand often cause this message.

What is the difference between CSV and CSV UTF-8?

Both are comma-separated text. CSV UTF-8 uses Unicode encoding, so accented letters, currency symbols and non-Latin scripts survive the export. The older CSV (Comma delimited) option uses a regional code page, which can turn characters such as é or the euro sign into question marks. Choose UTF-8 unless the receiving system specifically needs the older type.

Why does my CSV lose its formatting when I reopen it?

CSV is plain text and stores no formatting, column widths, formulas or extra sheets. When you reopen it, Excel applies default formatting and guesses the data types again. Do your work in an .xlsx file and export to CSV only when you need the data elsewhere. Keep the .xlsx as your master copy.

What does .xlsm mean in Excel?

.xlsm is the Excel Macro-Enabled Workbook format. It is the same as .xlsx but can store VBA code. When you open one, Excel may show a security bar asking whether to enable content. Only enable macros in files from people you trust, because macros can run code on your computer.

Related guides

Links in this guide

Link Type Why it helps
Microsoft Support: File formats that are supported in Excel External Official list of every Excel file type
Microsoft Support: Import or export text (.txt or .csv) files External Official CSV export and text import steps
What is a macro in Excel? Internal When you need .xlsm instead of .xlsx
Free Office alternatives vs Microsoft Office Internal What happens to files in other spreadsheet apps
Insert a header and footer in Excel Internal Preparing a sheet before saving as PDF
Office versions compared Internal Function differences between releases
Office 2024 licence keys Internal Current perpetual Office editions
Excel tutorial for beginners Internal Saving and opening workbooks for new users
Excel, Excel tips, How-to