What is an XLSM file?
Files with XLSM extension is a type of Spreadsheet files that support Macros. From application point of view, a Macro is set of instructions that are used for automating processes. A macro is used to record the steps that are performed repeatedly and facilitates performing the actions by running the macro again. Macros are programmed with Microsoft’s Visual Basic for Applications (VBA) from within the Excel Workbook using the Visual Basic Editor and can be run/debug directly from there.
XLSM files are similar to XLM file formats but are based on the Open XML format introduced in Microsoft Office 2007. In other words, XLSM are XLSX files but with support of macros. By default, Excel itself provides several macros for common use. However, you can also record your own macros with required functions.
XLSM - Recording a Macro
Excel provides easy to use steps for recording a macro. It requires you have Developer tools installed in order to work with Macros. Once a macro recording is in process, it records each user action to be played later on. Macro recording actually involves all the steps a user performs after the recording starts. Thus, if you make a cell’s content bold, italic and set its text justification after a macro recording has been started, all these commands will be recorded. Each recorded macro can be assigned a shortcut as well for quick playback later on. Macro recording generates VBA code in the form of a macro that can be edited using the Visual Basic Editor (VBE).
How to Open an XLSM File?
An .xlsm
file is a macro-enabled Excel workbook. It’s just like a regular Excel file (.xlsx
), but it can contain macros — small scripts that automate tasks.
How to Open XLSM Files:
On Windows or macOS (Using Microsoft Excel)
- Open Microsoft Excel.
- Go to
File
→Open
and select the.xlsm
file. - If prompted, enable macros by clicking “Enable Content” at the top of the screen.
Using Google Sheets (View Only, No Macros)
- Upload the
.xlsm
file to Google Drive. - Open it with Google Sheets — you can view and edit the data, but macros won’t work.
- Upload the
Using LibreOffice Calc (Free Alternative)
- Download and install LibreOffice.
- Open the
.xlsm
file in LibreOffice Calc. - Some macros may work, but not all are compatible.
What is the difference between XLSX and XLSM files?
XLSX files are standard Excel workbooks that don’t support macros. XLSM files, on the other hand, are macro-enabled and can contain VBA scripts used to automate tasks. If your spreadsheet includes macros, it must be saved as an XLSM file.