This article explains what an XLM file is and how to use one in Microsoft Excel.

What to Know

  • An XLM file is an Excel 4.0 macro used to automate actions in Excel.You can open one with modern versions of Excel after changing the program’s Trust Center settings.Take extra care when opening files that contain macros.

What Is an XLM File?

A file with the XLM file extension is an Excel 4.0 macro file. Macros allow automation so that repetitive tasks can be “played” to save time and lower the likelihood of errors.

This macro format was first added to Excel in v4.0, released in 1992. Newer Excel formats like XLSM and XLTM are similar in that they can store macros, but unlike XLM files, they’re actual spreadsheets that include macros. An XLM file is an outdated format that is, in and of itself, a macro file.

How to Open an XLM File

While Microsoft suggests that you no longer use them—and even disables them by default—you can still open XLM files with Excel (see the steps below if you’re getting an error).

It may seem like the XLM and XML formats are similar since their file extensions look the same, but they’re actually two entirely different file formats.

Microsoft’s free Excel Viewer should work, too, plus the free LibreOffice Calc.

If you get a security-related error when trying to use the file in Excel, change the program’s security settings to allow it.

It’s important to take great care when opening executable file formats like .XLM files that you may have received via email or downloaded from websites you’re not familiar with.

  • Go to File > Options, choose Trust Center from the left, and then select Trust Center Settings from the right.
  • Choose Macro Settings from the left, and then select Enable all macros (not recommended; potentially dangerous code can run).
  • Choose File Block Settings from the left, find Excel 4 Macrosheets and Add-in Files, and ensure the Open box has a check in it.
  • At the bottom, select the box next to Open selected file types in Protected View and allow editing.
  • Select OK on the open windows to save, and then try to open the XLM file again.

How to Convert an XLM File

We haven’t confirmed, but you might be able to open an XLM file in Excel or LibreOffice Calc and then save the open file to another similar format.

Go to File > Options, choose Trust Center from the left, and then select Trust Center Settings from the right.

Choose Macro Settings from the left, and then select Enable all macros (not recommended; potentially dangerous code can run).

Choose File Block Settings from the left, find Excel 4 Macrosheets and Add-in Files, and ensure the Open box has a check in it.

At the bottom, select the box next to Open selected file types in Protected View and allow editing.

Select OK on the open windows to save, and then try to open the XLM file again.

According to Microsoft, although Excel still supports Excel 4.0 macros, they encourage you to migrate them to the latest version of Microsoft Visual Basic for Applications (VBA).

If you’re trying to figure out how to convert an XML file, learn more about XML files to see how to do just that.

Still Can’t Open the File?

If your file doesn’t open at this point, and you’re sure you’re not confusing it for an XML file, you might still be misreading the file extension. Some files use an extension that closely resembles XLM even if the formats aren’t related.

XMI is one example. That last letter is a lowercase “i” and the file extension could be used for extended MIDI files—very different from macro files.

A similar file extension is LMX. Although it contains all the same letters as this file, it’s used for Landmark Exchange files and can be opened with Nokia PC Suite.

Get the Latest Tech News Delivered Every Day