We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Macro disappeared after saving .xlsm file to .xls file

Hi ,

We have created a template (.xlsm) and the template has some macro. When we are downloading

this template and saved as .xls file, we lost all our macros and validation formulas in it.

We are using ASPOSE.CELLS v7.7.2.1.


Samir Ray

Hi Samir,

Thanks for your posting and using Aspose.Cells.

Please provide us your source xlsm file which you are converting to xls format and it is losing macros. Also let us know the sample code you are using to replicate this issue. We will look into it and update you asap.

Hi, I have attached the sample template.

we are using

Workbook.Save(Response, fileName +

".xls", ContentDisposition.Attachment,

new XlsSaveOptions(SaveFormat.Excel97To2003)); to save the file.

Hi Samir,

Thanks for your file and using Aspose.Cells.

We have looked into this issue and found that it is actually unsupported feature. When you downgrade from Xlsm to Xls format, macros are lost, however when you upgrade from Xls to Xlsm format, then macros are preserved.

However, we have logged this issue in our database for investigation. We will look into it and see if it could be supported. Once, there is some fix or other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42431.


Thanks for your posting and using Aspose.Cells.

We have fixed this issue.

Please download and try the latest fix: Aspose.Cells for .NET 7.7.2 and let us know your feedback.


Using the version v7.7.2.3 , we are able to save to .xls file with macro. But we failed to do the same thing while saving to .xlsx file from .xlsm.

- in case of .xls , the name ranges are aslo not created properly.

Please can you look into it and resolve ASAP as this is vaery important for one of our delivery.


Hi Samir,

Thanks for using Aspose.Cells.

You cannot save XLSM file into XLSX format and retain macros. If you will save XLSM file into XLSX file, macros will be lost. You can check this behavior in MS-Excel. XLSX format does not support macros.

We did not find any issue with named ranges. Kindly provide screenshot highlighting your issues. It will help us look into your issue precisely and we will be able to help you asap.

The issues you have found earlier (filed as CELLSNET-42431) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.