.XLM File Extension
Microsoft Excel Macro
3.9 | 55 Votes
What is an XLM file?
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."
How to open an XLM file
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:
- Select File → Options → Trust Center and click Trust Center Settings
- Select Macro Settings, and click "Enable all macros (not recommended; potentially dangerous code can run)"
- 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
- 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.