Probably 99% of all Excel workbooks are saved in the XLSX file type these days. But there are various other file extensions available: For example XLSM, XLSB or “older” Excel users might still remember the XLS file type. What are the differences of these file types? And even more important: Which one should you use?
File types
When you save an Excel workbook for the first time or use the “Save As” function, you are asked for a folder, file name as well as the file type. By default, Excel suggests the XLSX file type (unless your file has VBA macros). The window looks similar to the screenshot on the right side.
So which file type are you going to use? The answer – like so often: It depends. Before we conclude in a decision tree, we we take a look at the most important file extensions in Excel with their advantages and disadvantages first.
XLSX
The “default” file extension is XLSX. The large majority of Excel workbooks uses this format these days. Microsoft says in the Excel help text about the XLSX file format:
The default XML-based file format for Excel 2007-2013. Cannot store Microsoft Visual Basic for Applications (VBA) macro code […].
Most of the time you use the XLSX format: It’s save (can’t store malicious code), has the maximum number of rows and columns and is best known. XLSX is available since Excel 2007 and replaces the old XLS file type. It uses the open XML standard so which is documented well.
Knowing these quick facts, there are the following advantages and disadvantages for the XLSX file format:
Advantages | Disadvantages |
---|---|
|
|
XLS
The XLS file type has been the default Excel file extension and format before Excel 2007. In Excel 2007, XLSX replaced the XLS format. Therefore, XLS is kind of outdated right now. In the daily life you won’t find it often any more. But some data base tools still export data as XLS files.
The XLS file type has some disadvantages towards the newer file types XLSX or XLSM: It’s rather unsafe as it can contain VBA macros with malicious code. Also, it needs more disk space than the other file types and at the same time has less rows and columns.
On the other side the only advantage: You can easily open XLS files with older versions of Excel.
Advantages | Disadvantages |
---|---|
|
|
XLSM
If you include VBA macros in your XLSX file, you will be asked to change the file extension to XLSM. Only that way you can save your macro within the Excel file (there are other file types possible, e.g. XLSB – but you can’t use XLSX for VBA macros). Therefore, it has most of the advantages and disadvantages of the XLSX file type. Positive: You can immediately identify Excel files with VBA macros.
Advantages | Disadvantages |
---|---|
|
|
XLSB
Many people don’t know that there is an actual alternative to the XLSX and XLSM file type: The XLSB file extension. XLSB files store the data a little bit different than the XLSX or XLSM file types: They don’t use the XLM file structure. Instead, XLSB files try to save disk space because the data is stored in the binary structure. The main difference: Binary files are computer- but not human-readable. For more information on binary files in general, please refer to this Wikipedia entry.
The main disadvantage: Binary Excel files can contain VBA macros. So unless you don’t know the origin of a file, please consider well before opening them. Besides that: All the other disadvantages seem minor.
Advantages | Disadvantages |
---|---|
|
|
Do you want to boost your productivity in Excel?
Get the Professor Excel ribbon!
Add more than 120 great features to Excel!
CSV
CSV stands for comma separated values. These files are basically plain text – so there are no formulas or formatting. CSV is often used for data exchange. Excel provides the functionality to import or even directly open CSV files.
The basic application for CSV files: Import or export data. Data base programs often export data as CSV files. Also if you want to transport Excel data into a database program, often the CSV file type works.
Advantages | Disadvantages |
---|---|
|
|
ODS
ODS stands for Open Document Spreadsheet. The file type is designed to work on both Excel and other applications, e.g. LibreOffice. From the Excel point of view, ODS doesn’t support all the features. Text and data is usually saved well though. But formatting and many other features (for example charts, tables, conditional formatting) might run into problems.
Advantages | Disadvantages |
---|---|
|
|
XLSX (Strict)
Besides the regular XLSX format, Excel offers to save your Excel workbook as “Strict Open XML Spreadsheet”. So what is the difference between those two? Basically, the two file types use the same structure. But:
The Strict variant has less support for backwards compatibility when converting documents from older formats.
The Strict variant of XLSX disallows a variety of elements and attributes that are permitted in the more common Transitional variant […]
Advantages | Disadvantages |
---|---|
|
|
As you’ve probably heard of PDF files, we won’t go much into detail here. PDF stands for portable document format and has the reputation of not easily being manipulated. Also, it’s quite save to say that how a PDF file looks on your computer, it will most probably look like this on most other computers.
And that’s it for the advantages. I recommend using it when you present your final results in the following cases:
- The recipient of your file should not edit it any more.
- Formatting should be exactly preserved.
- There is no database included, just the summarized results.
That could be the case if somebody wants to check your results on an iPad or a similar device. But: In many cases it would be professional (and nice) to also send at least parts of your Excel file. That way, your recipient could at least take a look at the calculation process.
Advantages | Disadvantages |
---|---|
|
|
XLAM
XLAM is the file extension for Excel add-ins. Also our add-ins (for example the popular “Professor Excel Tools“) are XLAM files. They can contain VBA macros, worksheets as well as forms, images and individual ribbons. If you double click on such file, it will open in Excel and you can use the funcationality of the add-in. But next time you open Excel again, it won’t be available any longer. You rather have to enable the add-in within the options (File –> Options –> Add-Ins).
As the XLAM file type is not really an alternative for all the other file extensions above, we skip the advantages and disadvantages.
Comparison of file types
So if we put all the advantages, disadvantages and facts from above together, we come to the following comparison:
Which file type should you use?
Decision Tree
In order to define the best file type for your Excel workbook, please follow the decision tree.
- The first question: Do you just want to display your results only? Then you could also consider the PDF format. But if the recipient of your work wants to edit or follow up your calculations, you shouldn’t use PDF.
- Does your file contain VBA macros?
- If yes, choose XLSB if you have a large file. Choose XLSM for a file size smaller than app. 10 MB.
- If no and you got a large file (larger than app. 10 MB), also choose XLSB.
- If no (you don’t have macros) and your file small, follow the tree on the right hand side.
- The lower two levels of the decision tree are just about compatibility: If you want to open and edit your workbook with another software, choose the strict XLSX or ODF format.
- If you want to make sure that you can open it with versions of Excel 2003 or earlier, go for XLS.
Summary
In conclusion, you can distill a quite short table (if you don’t need to consider old file types and other applications as LibreOffice). You just have to answer two questions: Do you need VBA macros and do you work with a large amount of data?
Wonderful information on Excel. It answered many questions I have had for a long time and didn’t know where to find the answers. You pulled a lot on information together in a succinct presentation. Thanks Much!!!
Hi Foster,
Thanks for the reply. I’m glad it has helped you!
Best regards,
Henrik
I am surprised that your pros/cons don’t list any performance issues with binary files. I can’t have any large pivot tables in a binary file or it freezes up.
Thanks for the feedback, Mark. Does this always happen to you working in the xlsb file format? I haven’t noticed any issues – at least not more than in the xlsx or other file formats.
You need to check what you are telling people
“Excel suggests the XLSX file type (unless your file doesn’t have VBA macros)” is misleading.
“Can only use up to 65,536 (2^16) rows and 256 (2^8) rows.” is just wrong.
Hi Bloodknot,
Thanks for the feedback. Please provide any proof for your accusations.
What do you mean with misleading? I suppose you refer to the sentence “By default, Excel suggests the XLSX file type (unless your file doesn’t have VBA macros).” That’s exactly what happens when you save a new Excel file.
And concerning the second part: What is wrong about it? It refers to the “XLS” file format. Please try it yourself: Save an Excel file as .xls, close Excel, open the file again and scroll to the right bottom corner. What is the maximum row number there? What is the maximum column?
I’m always happy about feedback and would gladly correct inaccurate information. So please provide any kind of evidence or proof supporting your comments.
Thanks and best regards,
Henrik
“By default, Excel suggests the XLSX file type (unless your file doesn’t have VBA macros).”
Shouldn’t this be unless your file HAS VBA macros? in which case it will suggest xlsm?
Thanks, Mark, I have corrected it accordingly.
It appears that worksheets cannot be saved in a .xlam file. Is that correct?
I have sevral functions that do lookups on multple arrays of data. I added the array into Named Ranges on a worksheet, thing this would make it easy to update the arrays when needed. Once I got everything working, I saved as .xlam and nothing works. When I open the .xlam, the workbook is gone.
What is the best file type for this? Or should I just put my lookup data into static arrays in the code?
Hi, I’m wanting to send a price list to customers with excel and have the formulas available to calculate the number of items as well as the total prices.
My question is can an excel file be saved in a particular format so as the information stays as it is and only the inputted information (how many of…) is changeable, and it stills calculates the totals?