Convert an XLSM File to XLS in Excel Without Losing Macros
Question details
The user needs to convert an XLSM report to the older XLS format while retaining its 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.
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.
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.
Open the XLSM file in Excel, select File > Save As, and choose a destination folder.
In the Save as type or File Format menu, select Excel 97–2003 Workbook (*.xls), enter a file name, and select Save.
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.
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.
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.

Hide zero-total columns manually if the macro cannot be used
Use this fallback when the report only needs zero-total columns hidden and automatic hiding is not essential.
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.

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.




