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

Free Support Forum - aspose.com

Saving and opening XLSM

Hi Aspose Cells team,

We have an issue working with an XLSM file containing macros.
We are just saving a copy of the XLSM file and it get corrupted: Excel ask if we want to recover (if so, then parts of macros get removed).
Basically, here is our code:

FileOutputStream fileOutputStream = new FileOutputStream(outputFilePath);
Workbook workBook = new Workbook(templateFilePath);
workBook.save(fileOutputStream, FileFormatType.XLSM);

Could you please have a look?


Thanks for the template file.

After an initial test, I observed the issue as you mentioned by opening and re-saving the template XLSM file, the output file is corrupted when opening it into MS Excel.
Sample code:

Workbook wb = new Workbook(“template.xlsm”);
wb.save(“out1.xlsm”, SaveFormat.XLSM);

I have logged a ticket with an id “CELLSJAVA-41097” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.


Thanks for using Aspose.Cells for Java.

Please download and try this fix: Aspose.Cells for Java v8.3.0.2 and let us know your feedback.

Hi Aspose Cells team,
Just to let you know that we ran some tests with this new release and it works fine now.
Thanks for your support!

Hi Jean,

Thank you for the confirmation. We may now close the aforesaid ticket, Please feel free to contact us back in case you need our further assistance with Aspose APIs.

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

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