File Format & Compatibility

Convert an XLSM File to XLS in Excel Without Losing Macros

Maira MehtabMaira Mehtab Nov 14, 2026 868 views

Question details

The user needs to convert an XLSM report to the older XLS format while retaining its macros.

Convert an XLSM File to XLS in Excel Without Losing Macros
Product
Microsoft Excel
Device & OS
not provided
Scenario
A target system accepts only Excel 97–2003 XLS files.
Observed behavior
An error occurs during conversion, and the user needs to know whether the macros will remain usable.
Before you start

Open the XLSM report in Excel and check whether it exceeds the XLS limits of 65,536 rows or 256 columns per worksheet. Identify the macros you need to test and confirm that the destination folder allows you to save files.

Solution 1Recommended

Save as an XLS workbook and test the macros

Use Excel's 97–2003 format to retain the VBA project where possible, then verify that the converted report works.

The XLS format can contain VBA macros, but features or VBA code that rely on newer Excel functionality may not work in the older format.

1
Choose Save As

Open the XLSM file in Excel, select File > Save As, and choose a destination folder.

2
Select the XLS format

In the Save as type or File Format menu, select Excel 97–2003 Workbook (*.xls), enter a file name, and select Save.

3
Review compatibility warnings

Read any Compatibility Checker messages and resolve important issues before completing the save. If an error appears, note its wording and check the destination folder and workbook size.

4
Test the converted file

Open the new XLS file, enable macros only if you trust the file, and run each required macro from Developer > Macros or View > Macros. Check the resulting report in the target system as well.

5
Inspect VBA if needed

If a macro fails, open the VBA editor from Developer > Visual Basic and review the affected code for features that depend on newer Excel versions.

Save as an XLS workbook and test the macros
Check macro security: If macros are blocked, review Excel's Trust Center macro settings and the file's trust status. Do not enable macros from an untrusted source.
Free Microsoft Office alternative

Work with Excel Reports in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for opening and editing spreadsheets. Its Excel format support can make moving reports easier, but it does not fix Excel conversion errors or guarantee VBA macro compatibility.

Open and edit reports in a familiar spreadsheet interfaceSupports Microsoft Excel XLS and XLSX formatsFree and lightweight for everyday document workReview spreadsheet data when moving from Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Can an XLS file contain macros?

Yes. Excel 97–2003 XLS files can contain VBA macros. Save through File > Save As and select Excel 97–2003 Workbook (*.xls), then test the macros in the saved file.

Why might a macro stop working after conversion?

The code or workbook may depend on features introduced after Excel 97–2003. Run the macro in the converted XLS file and inspect any failing code under Developer > Visual Basic.

What size limits apply to an XLS worksheet?

An Excel 97–2003 worksheet supports up to 65,536 rows and 256 columns. Check the report before saving and review any Compatibility Checker warnings.

Can a formula automatically hide columns with zero totals?

No. A SUM formula can identify a zero total, but it cannot hide the column by itself. Hide the column using its header's right-click menu, or use compatible automation for automatic hiding.