Xlsx or xlsm
Hem / Teknik & Digitalt / Xlsx or xlsm
Users should be cautious when opening XLSM files from untrusted sources.
Use Cases for XLSX and XLSM
When to Use XLSX
Standard data storage and analysis without the need for automation.
When file size and security are primary concerns.
Sharing workbooks with users who may not need or want to run macros.
When to Use XLSM
Automating repetitive tasks and data manipulation using VBA macros.
Creating complex models that require scripting and automation.
When the workbook needs to perform tasks that standard Excel functions cannot handle.
Example Code: Saving an Excel File as XLSX and XLSM
Frequently Asked Questions
Can I convert an XLSX file to an XLSM file?
Yes, you can convert an XLSX file to an XLSM file by saving it with the .xlsm extension and adding the necessary macros.
Are macros in XLSM files safe?
Macros can pose security risks if they are from untrusted sources.
The large majority of Excel workbooks uses this format these days.
Following image shows the last possible row and column of xlsx/xlsm file.
Compressed file format
xlsx and xlsm are compressed file formats. Therefore, XLS is kind of outdated right now. But the old Excel file format xls may or may not contain macros.
Proprietary Vs Industry Standard
.xls file format is Microsoft's proprietary binary format. Users need them to transform Excel-native data into other formats for sharing across different channels.
To sum up, ".xls" and ".xlsx" are basic, common and commonly used tables.
Home > Think Tank > Differences between xls, xlsx, xlsm, xlsb and csv
Many friends often use excel in their daily work.
The window looks similar to the screenshot on the right side.
So which file type are you going to use? Its biggest feature is that it has only 65536 rows and 256 columns. PDF stands for portable document format and has the reputation of not easily being manipulated. A major feature of ".csv" is that, in principle, the amount of stored data is unlimited.
xlsb is a more basic table, closer to computer language than ".xls" and ".xlsx". There is a huge difference in the amount of data stored with Excel 2007 and later versions (1048576 rows, 16384 columns). But:
The Strict variant has less support for backwards compatibility when converting documents from older formats.
Furthermore:
The Strict variant of XLSX disallows a variety of elements and attributes that are permitted in the more common Transitional variant […]
| Advantages | Disadvantages |
|---|---|
|
|
XLSM
If you include VBA macros in your XLSX file, you will be asked to change the file extension to XLSM.
In Excel 2007, XLSX replaced the XLS format. CSV is often used for data exchange. 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.
Data base programs often export data as CSV files.
The only thing to note is that if you save it in the ".xls" format, the data in the original table that exceeds 65536 rows and 256 columns will be truncated. The editor reveals one by one for you.
Introduction to 5 excel worksheet formats
".xls" - Early excel worksheet
In 1987, Microsoft developed the first Excel spreadsheet for the Windows system, and the product has been updated more than a dozen versions so far.
While XLSX is suitable for standard tasks and offers better security and smaller file sizes, XLSM is ideal for advanced tasks requiring macros.