I created a 2007 Excel (.xlsm) file with a macro in it, used Aspose to Save it as a 2003 Excel file (.xls), opened it and found that the macro was gone. Similarly, going from 2010 to 2003 had the same problem.
The reverse works fine, ie I created a 2003 Excel (.xls) file with a macro in it, used Aspose to Save it as a 2007 Excel file (.xlsm), opened it and found that the macro was still there. All other combinations (2003 -> 2010, 2007 -> 2010, 2010 -> 2007) work fine as well.
I’ve attached a sample app that illustrates this problem. Can this be fixed?
The Aspose.Cells version I’m using is: 7.1.2.1
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
Please download and use the latest version:
Aspose.Cells
for .NET v7.1.2.7
Regarding preservation of macros while converting one format into another, please see the summary below.
Xls → Xlsm (macros will be preserved)
Xlsm → Xls (macros will be lost)
Xlsx does not support any macros.
Please Note:
Xls is old Ms-Excel 2003 file format
Xlsx/Xlsm are newer Ms-Excel 2007/2010 file formats.
Hi,
I tried the version you provided (7.1.2.7) in the sample app and I got the same results as before: xlsm -> xls has lost macro.
Can you confirm that this is indeed a bug and whether there will be a fix?
Thanks,
Ann
Hi,
No, it is not a bug. It is actually unsupported feature.
Macros will be lost whenever you will downgrade from Xlsm into Xls.
Xlsm --> Xls (macros will be lost)
The issues you have found earlier (filed as CELLSNET-40588) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.