Excel files use different extensions depending on how they're saved
The extension of an Excel file is the short code at the end of the filename that tells your computer what kind of file it is. The most common extension is .xlsx, which is the default format for Excel 2007 and newer versions. Other extensions like .xls, .xlsm, and .csv exist because Excel can save files in different formats, each with different capabilities and uses.
The extension matters because it determines whether your file can contain certain features — like formulas, macros, or multiple sheets — and whether other programs can open it. When you save a file in Excel, you choose the format, and the extension changes to match.
Key Takeaways
- .xlsx is the standard Excel format since 2007 and works with formulas, charts, and multiple sheets but cannot store macros.
- .xls is the older Excel format from before 2007 that most modern programs still recognize, though Excel itself no longer saves to this format by default.
- .xlsm is identical to .xlsx but includes the ability to store macros, which are recorded sequences of actions you can replay.
- .csv is a plain-text format that strips away formatting and formulas, making it useful for sharing data between different programs.
- The extension you choose depends on what features you need and who else needs to open the file.
.xlsx — the standard Excel format
.xlsx stands for "Excel Spreadsheet" and has been the default format since Microsoft Office 2007. When you open Excel and create a new file, it saves as .xlsx unless you change the format. This format can hold formulas, charts, conditional formatting, pivot tables, and multiple sheets within a single file.
Almost every program that works with spreadsheets — Google Sheets, LibreOffice Calc, Numbers on Mac — can open .xlsx files. This makes it the safest choice when you need to share a file with someone using different software or an older version of Excel. The file size is also compressed, so .xlsx files take up less storage space than older formats.
The one thing .xlsx cannot do is store macros, which are automated sequences of actions. If you record a macro in Excel and try to save it as .xlsx, Excel will warn you that the macro will be lost and ask if you want to save in a different format instead.
.xls — the older Excel format
.xls is the format Excel used before 2007. Files with this extension still open in modern versions of Excel, and many other programs recognize them too. However, Excel no longer saves new files as .xls by default — you have to choose it manually from the "Save As" menu.
You might encounter .xls files if you're working with spreadsheets created more than 15 years ago or if someone is using very old software. The format works fine for basic spreadsheets with formulas and charts, but it has lower limits on the number of rows and columns you can use compared to .xlsx. An .xls file can hold up to 65,536 rows and 256 columns, while .xlsx supports over 1 million rows and 16,000 columns.
If someone sends you an .xls file and you want to use newer Excel features, you can open it in Excel and save it as .xlsx, which converts it to the modern format.
.xlsm — Excel with macros
.xlsm is identical to .xlsx in every way except that it can store macros. A macro is a recording of actions you perform in Excel — like formatting cells, copying data, or running calculations — that you can play back automatically whenever you need to repeat those steps.
If you create a macro in Excel and want to save it with the file, you must save as .xlsm instead of .xlsx. When someone opens an .xlsm file, Excel will ask whether they want to enable macros, because macros can potentially contain harmful code if they come from an untrusted source.
Most programs other than Excel cannot open .xlsm files or will open them but ignore the macros. If you need to share a file with someone using Google Sheets or another spreadsheet program, converting it to .xlsx will remove the macros but preserve all the data and formulas.
.csv — plain text for data sharing
.csv stands for "comma-separated values" and is a plain-text format that strips away all formatting, formulas, and multiple sheets. When you save an Excel file as .csv, you get a single sheet with just the raw data, with commas separating the columns.
The advantage of .csv is that almost every program on earth can open it — spreadsheet software, databases, statistical programs, and even basic text editors. This makes .csv the standard format for moving data between different systems. If you need to import data into accounting software, a website, or a database, .csv is usually the format they ask for.
The downside is that .csv loses everything except the data itself. Formulas become their calculated values, colors and fonts disappear, and if you have multiple sheets, only the active sheet saves. When you reopen a .csv file in Excel, it looks like a plain table with no formatting.
Other Excel extensions you might see
.xlsb is a binary format that Excel uses to save very large files more efficiently. It works like .xlsx but compresses the data differently, making the file smaller. Most people never need to use this format, but it exists for spreadsheets with thousands of rows of data.
.xltx and .xltm are template formats. When you save a file as a template, Excel stores it in a way that lets you create new files based on that template without modifying the original. .xltx is a template without macros, and .xltm is a template with macros.
.ods is the format used by LibreOffice Calc and other open-source spreadsheet programs. Excel can open and save .ods files, though some advanced Excel features may not transfer perfectly. If you're working with someone using LibreOffice, .ods is a good middle ground.
How to change the file extension
To save an Excel file in a different format, open the file and click "File" in the top left corner. Then click "Save As" and choose the location where you want to save it. Below the filename field, you'll see a dropdown menu labeled "Save as type" — click it and select the format you want.
Excel will warn you if the new format cannot store certain features in your file. For example, if you save a file with macros as .xlsx, Excel tells you the macros will be lost. Read the warning carefully before confirming, because the conversion cannot always be undone.
You can also change the extension by right-clicking the file in Windows File Explorer or Mac Finder and selecting "Rename," then typing a new extension. However, this only changes the label — it doesn't actually convert the file. The safer method is to use "Save As" inside Excel, which performs the actual conversion.
Frequently Asked Questions
Can I open an .xlsx file in older versions of Excel?
Excel 2003 and earlier cannot open .xlsx files natively. However, Microsoft released a free compatibility pack that allows older versions to open, edit, and save .xlsx files. If you're using Excel 2007 or newer, .xlsx files open automatically.
What happens if I change the extension manually without converting the file?
If you rename a file from .xlsx to .xls just by changing the letters, the file doesn't actually convert — it's still .xlsx inside. This can cause problems because the program expects the format to match the extension. Always use "Save As" inside Excel to properly convert between formats.
Why does Excel ask about macros when I open an .xlsm file?
Macros can contain code that performs actions automatically, and malicious code could potentially harm your computer. Excel disables macros by default and asks you to enable them only if you trust the file source. If you created the file yourself, it's safe to enable macros.
Can I use .csv if my spreadsheet has multiple sheets?
No. When you save as .csv, only the currently active sheet is saved. If you need to preserve multiple sheets, use .xlsx or .xlsm instead. If you must use .csv, you'll need to save each sheet as a separate .csv file.
What's the difference between .xlsx and .xlsm if both can store formulas?
Both formats store formulas identically. The only difference is that .xlsm can also store macros — automated sequences of actions. If your file doesn't contain macros, .xlsx and .xlsm function exactly the same way.