00

Quick answer

  • XLSM is a macro-enabled Microsoft Excel workbook format that stores spreadsheet data and may contain VBA code or Excel 4.0 macro sheets, so its active content requires caution.
  • On Windows or Mac, open the XLSM file in desktop Excel. Inspect and edit workbook content without enabling macros. Excel for the web can open and edit the workbook while preserving existing macros, but it cannot create, run, edit, or remove them; use desktop Excel for those macro operations.
  • Treat an XLSM file as high risk when its source or purpose is uncertain. It can contain VBA or Excel 4.0 macros, and Microsoft warns that macros may introduce viruses or malicious software. Do not enable macros merely to view or edit the workbook, and do not assume that a file is safe because it opens normally.
01

XLSM File: How to Open, Check, and Convert It

An XLSM file is Microsoft's XML-based, macro-enabled workbook format for Excel 2007, 2010, 2013, 2016, 2019, and 2021. It is closely related to the Office Open XML family, which uses XML-based ZIP packages. Microsoft's Office VBA File Format Structure documents storage containing a VBA project with embedded macros and custom forms. IANA registers its media type as application/vnd.ms-excel.sheet.macroEnabled.12 and lists no magic number.

Keep the original first

Saving XLSM as XLSX removes VBA code and Excel 4.0 macro sheets because XLSX cannot store them. CSV and text-based save targets save only the active worksheet. Saving as ODS and reopening may lose formatting, so none of these conversions should be assumed to preserve the complete workbook.

02

Open a file

On Windows or Mac, open the XLSM file in desktop Excel. Inspect and edit workbook content without enabling macros. Excel for the web can open and edit the workbook while preserving existing macros, but it cannot create, run, edit, or remove them; use desktop Excel for those macro operations.

I only need to view it

On Windows or Mac, open the XLSM file in desktop Excel. Inspect and edit workbook content without enabling macros. Excel for the web can open and edit the workbook while preserving existing macros, but it cannot create, run, edit, or remove them; use desktop Excel for those macro operations.

I need to share it

Saving XLSM as XLSX removes VBA code and Excel 4.0 macro sheets because XLSX cannot store them. CSV and text-based save targets save only the active worksheet. Saving as ODS and reopening may lose formatting, so none of these conversions should be assumed to preserve the complete workbook.

03

File safety

Treat an XLSM file as high risk when its source or purpose is uncertain. It can contain VBA or Excel 4.0 macros, and Microsoft warns that macros may introduce viruses or malicious software. Do not enable macros merely to view or edit the workbook, and do not assume that a file is safe because it opens normally.

Pause when something does not match

Do not open the file when its source, double extension, or actual contents do not match what you expected.

04

Converters

Saving XLSM as XLSX removes VBA code and Excel 4.0 macro sheets because XLSX cannot store them. CSV and text-based save targets save only the active worksheet. Saving as ODS and reopening may lose formatting, so none of these conversions should be assumed to preserve the complete workbook.

Before converting

Work from a copy, then compare image quality, metadata, and layout after conversion.

05

Frequently asked questions

What is an XLSM file and what is it used for?

An XLSM file is a Microsoft Excel workbook that stores spreadsheet content and may also store VBA code or Excel 4.0 macro sheets. It is used when an Excel workbook must retain macro content.

How do I open an XLSM file in Excel?

Open the XLSM file with desktop Excel to view and edit the workbook. Viewing or editing does not require enabling its macros.

How do I open an XLSM file on Windows?

Use a supported desktop version of Microsoft Excel and open the XLSM file there. Keep macros disabled unless you trust the file and specifically need its automated behavior.

How do I open an XLSM file on Mac?

Open the XLSM file in desktop Microsoft Excel. Use the desktop application if you need to view, edit, or remove its macros.

My XLSM file won't open or shows an error—what should I do?

Verify that the file really is an XLSM workbook and open it with a supported desktop version of Excel. Do not enable macros while troubleshooting.

What is the difference between XLSM and XLSX?

XLSM can store VBA code and Excel 4.0 macro sheets. XLSX cannot store either type of macro content.

How do I convert XLSM to XLSX, and will the macros be lost?

Save the workbook as XLSX in Excel only after deciding that its macros are unnecessary. VBA code and Excel 4.0 macro sheets cannot be preserved in XLSX.

Can Excel for the web run macros in an XLSM file?

No. Excel for the web can open and edit an XLSM workbook while preserving existing macros, but it cannot create, run, edit, or remove those macros.

Is an XLSM email attachment safe to open?

An XLSM attachment can contain active macro code, so treat an unexpected or untrusted file with high caution. You can view or edit the workbook without enabling macros.

What happens when I convert an XLSM file to CSV or ODS?

CSV and text-based save targets save only the active worksheet. An ODS round trip may lose formatting, so these formats cannot be assumed to preserve the entire XLSM workbook.

06

Related formats

Sources

Media type registration: application/vnd.ms-excel.sheet.macroEnabled.12 · IANA media type registry

File format reference for Word, Excel, and PowerPoint · Microsoft Learn official documentation

OOXML Format Family — ISO/IEC 29500 and ECMA 376 · Library of Congress Sustainability of Digital Formats

[MS-OVBA]: Office VBA File Format Structure · Microsoft Open Specifications

Work with VBA macros in Excel for the web · Microsoft Support official documentation

Enable or disable macros in Microsoft 365 files · Microsoft Support official security guidance

XlFileFormat enumeration (Excel) · Microsoft Learn Excel VBA reference