.XLM File Extension

There are 2 file types use the .XLM file extension:

  1. Excel Macro
  2. Microsoft Excel Macro

1. Excel Macro

Excel Macro

Contains macros used for automating processes in Microsoft Excel; may be preinstalled with Excel or created by the user; can be recorded by selecting Tools→Macro→Record New Macro...; when creating the macro, a keyboard shortcut can be assigned to run the macro.

Software's name License Platforms
Microsoft Excel Microsoft Excel Commercial MacWindows

Updated: September 20, 2006

2. Microsoft Excel Macro

Microsoft Excel Macro

An XLM file contains one or more macros used for automating processes in Microsoft Excel, a spreadsheet application. It is a script used to perform complex or repetitive Excel functions, such as inserting data in cells or formatting charts.

Microsoft introduced XLM files in 1992 with the release of Excel 4.0. The files were commonly used by Excel users until the late-2000s, when Microsoft released Excel 2007. Excel 2007 enabled users to save macros with spreadsheets and save those spreadsheets as .XLSM or .XLTM files.

While XLM files are not as common as they once were, you may still encounter an XLM file that was packaged with an older version of Excel or created by a user. To create an XLM file in Excel 4.0 to 2003, select Tools → Macro → Record New Macro.... When creating the macro, you can assign a keyboard shortcut to run the macro.

NOTE: To view or create a macro in Excel 365, select the "View" tab, then click "Macros."

You can open XLM files with Microsoft Excel in Windows and macOS. However, Microsoft encourages you to migrate the XLM macro to a later version of Microsoft Visual Basic for Applications (VBA).

If you encounter a "security setting" error message in Excel when trying to open an XLM file, you need to change the macro settings in the application to run the macro. To do this, follow these steps:

  1. Select File → Options → Trust Center and click Trust Center Settings
  2. Select Macro Settings, and click "Enable all macros (not recommended; potentially dangerous code can run)"
  3. Select File Block Settings and choose "Excel 4 Macrosheets and Add-in files" under the "File Type" category (verify that the "Open" checkbox is checked
  4. Choose "Open selected file types in Protected View and allow editing" under "Open behavior for selected file types" and click OK twice.

XLM files may be used to distribute and execute malware attacks on victims' computers. To protect against malicious attacks, never double-click an unknown XLM file. Verify the legitimacy of the source of the XLM file before attempting to run the macro in Excel.

Software's name License Platforms
Microsoft Excel Microsoft Excel Commercial MacWindows

Updated: August 15, 2020

Search File Extensions