.XLSM

XLSM File

Microsoft Excel Macro-Enabled Workbook (Open XML)
Ask a question
QUICK ANSWER

An XLSM file is a Microsoft Excel spreadsheet that contains VBA macros - automation code that runs inside the file. Open it in Microsoft Excel (full macro support), LibreOffice Calc, or WPS Office (both free, partial VBA support). Google Sheets and Excel for the web open the data but do not run macros. The key concern is safety: only enable macros in files from senders you trust - unsolicited XLSM files that prompt "Enable Content" are a common malware vector.

Developer: Microsoft Category: Spreadsheet Files Open standard MIME: application/vnd.ms-excel.sheet.macroEnabled.12
OPENS ON Windows macOS Linux Web
Related: .ODS · .NUMBERS · .XLSX · .XLSB

On this page

19k+ extensions indexed
Last reviewed Jul 3, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the XLSM file format?

.xlsm is a commonly used spreadsheet document created with Excel 2007 or later. .xlsm files store data in cells organized in rows and columns. The format is based on the Office Open XML standard and uses ZIP compression, making it structurally similar to an .xlsx file.

.xlsm and .xlsx are almost identical spreadsheet formats, with the key difference that .xlsm contains macros written in Visual Basic for Applications (VBA). A macro is a user-defined function that can be used to automate repetitive tasks, manipulate data, or drive other Office applications. Macros are disabled in Excel by default for security reasons, as macros are susceptible to being used for malicious code delivery. To use macros, the spreadsheet document must be saved as an .xlsm file; saving as .xlsx silently removes the VBA project.

Internally, the VBA project is stored as a binary xl/vbaProject.bin part inside the ZIP package. The package's [Content_Types].xml declares the macroEnabled.12 content type, which is what distinguishes .xlsm from .xlsx at the format level - both share the same PK magic bytes. A related format is .xltm, the macro-enabled Excel template variant, and .xlsb is the binary equivalent that also supports macros.

Security & safety

RISK: HIGH

XLSM is the high-risk member of the Excel family precisely because it CAN run code: its VBA macros are a classic malware vector. The attack pattern is an emailed .xlsm that pressures you to click 'Enable Content/Macros', after which the VBA downloads or executes a payload. Defences: Microsoft blocks macros by default in files that came from the internet (Mark of the Web) and opens untrusted files in Protected View - leave both on. Only enable macros in files you specifically expect from a trusted sender. If you just need the data and not the automation, open it in Google Sheets / Excel for the web (which don't run VBA) or save it as .xlsx to strip the code. Treat any unsolicited 'enable macros' request as hostile.

Format details

in a nutshell
FULL NAMEMicrosoft Excel Macro-Enabled Workbook (Open XML)
DEVELOPERMicrosoftsince 2007 (Excel 2007); the macro-enabled variant of the ECMA-376 / ISO-IEC 29500 format
MIME TYPEapplication/vnd.ms-excel.sheet.macroEnabled.12
TYPEZIP-based Office Open XML (OOXML / OPC) package containing a VBA macro project
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
00010203
HEX
504B0304
ASCII
PK··
XLSM is a ZIP/OPC package, byte-identical at the start to XLSX/DOCX/any ZIP. Distinguish XLSM from XLSX by internal content: an XLSM contains a vbaProject.bin part (xl/vbaProject.bin) and its [Content_Types].xml declares the macroEnabled.12 content type. The header alone cannot tell them apart.

Programs that open XLSM files

Windows3 apps
Microsoft Excel Paid Native app. Double-click to open; click 'Enable Content' only if you trust the source, to run the macros.
LibreOffice Calc Open-source Free; opens XLSM with data and charts. It runs Basic macros, but VBA compatibility is partial - complex Excel macros may not work.
WPS Office Spreadsheets Freemium Free Excel-like app with good XLSM compatibility, including many VBA macros.
macOS2 apps
Microsoft Excel Paid Native editing and macro support on macOS; double-click to open.
LibreOffice Calc Open-source Free; opens the data. VBA support is partial, so verify macro-dependent files.
Linux2 apps
LibreOffice Calc Open-source Pre-installed on most distros; opens XLSM data. Partial VBA execution.
OnlyOffice Spreadsheet Open-source High Excel compatibility including macros; good free option on Linux.
Web2 apps
Google Sheets Free Upload to Drive and open - reads the cells/formulas but does NOT run VBA macros (Sheets uses Apps Script instead). Good for viewing data, not the automation.
Excel for the web Free Upload to OneDrive and open in Excel online (free account). Views/edits data; VBA macros do not run in the browser.

Technical details

deep spec
MIME typeapplication/vnd.ms-excel.sheet.macroEnabled.12
Container formatZIP-based Office Open XML (OPC) package
Magic bytes50 4B 03 04 ("PK" - ZIP local file header at offset 0; byte-identical to .xlsx, distinguished only by internal content
VBA project partxl/vbaProject.bin - Compound File Binary (CFB) embedded inside the ZIP package
Macro languageVisual Basic for Applications (VBA)
Content-type identifiermacroEnabled.12, declared in [Content_Types].xml; this is what formally distinguishes .xlsm from .xlsx
Default macro securityMacros blocked on open; execution requires user confirmation via prompt or a configured trusted location
VBA code signingVBA project can be signed with a code-signing certificate to establish publisher trust and suppress prompts
EncryptionAES-256 password encryption via Office Open XML protection (available from Excel 2013 onward)
Maximum worksheet size1,048,576 rows × 16,384 columns per sheet
Template counterpart.xltm - the macro-enabled workbook template format; same internal structure, different extension role
Forced extension ruleExcel refuses to save a VBA-containing workbook as .xlsx; the user is prompted to save as .xlsm instead
Web and mobile limitationVBA macros do not execute in Excel for the web or Excel on mobile; macro content is preserved but inactive
Third-party VBA supportLibreOffice Calc opens .xlsm with partial VBA compatibility; complex macros or Excel object model calls may behave differently
Released2007 (Excel 2007); the macro-enabled variant of the ECMA-376 / ISO-IEC 29500 format
Open standardYes · royalty-free
Specificationlearn.microsoft.com

XLSM conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with XLSM files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about XLSM files.

Frequently asked questions

What is the difference between XLSX and XLSM?
They are the same modern Excel format except that XLSM can contain VBA macros (automation code) and XLSX cannot. If a workbook has macros, Excel makes you save it as .xlsm. The spreadsheet data is otherwise identical.
Is it safe to open an XLSM file?
Opening it to view is generally safe - the danger is enabling its macros. Only click 'Enable Content' for files from senders you trust and expect. Never enable macros in an unsolicited .xlsm; that's how a lot of malware spreads. For untrusted files, view them in Google Sheets / Excel online, which don't run VBA.
How do I open an XLSM file without Excel?
Use the free LibreOffice Calc or WPS Office (both open XLSM, with partial VBA support), or upload it to Google Sheets / Excel for the web to view the data. Note the online tools read the cells but do NOT run the macros.
How do I remove macros from an XLSM file?
Open it in Excel and Save As > Excel Workbook (.xlsx). Excel warns it will drop the VBA project, leaving a clean, code-free spreadsheet. This is the safest way to share a workbook whose automation you don't need.
Why won't the macros in my XLSM run?
Macros are likely blocked. If the file came from the internet/email, Excel disables macros by default (Mark of the Web) - if you trust it, unblock the file (right-click > Properties > Unblock) or move it to a trusted location, then enable content. Browser/online Excel and Google Sheets never run VBA.
How do I convert XLSM to PDF or CSV?
Open it in Excel, LibreOffice Calc, or Google Sheets and choose Save As / Export - PDF for a fixed shareable copy, CSV for a plain one-sheet data table. Both drop the macros.

References

1Microsoft - [MS-XLSX] / Office Open XML overviewlearn.microsoft.com
2Microsoft Support - Macros and 'Enable Content' / blocked macros from the internetsupport.microsoft.com

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.DATProgram Data File (generic)
4.EXEWindows Executable (Portable Executable)
5.RPMSGRestricted Permission Message
6.JPGJPEG Image
7.PARTPartial Download File
8.ICSiCalendar data file
9.BINCD/DVD Disc Image (BIN/CUE)
10.JSONJavaScript Object Notation file

Related extensions

.ODSOpenDocument Spreadsheet
.NUMBERSApple Numbers spreadsheet
.XLSXMicrosoft Excel Open XML Workbook
.XLSBMicrosoft Excel Binary Workbook
.GSHEETGoogle Sheets Shortcut (Link to a Google Sheets spreadsheet)
.XLSMicrosoft Excel 97-2003 Workbook (Binary Interchange File Format, BIFF8)

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z