Free Support Forum - aspose.com

Saving XLSB with structure protection, creates encrypted file format

HI there,

So I’m loading a XLSB file into a workbook using Apose.cells (21.5.0) then saving it out. The issue I’m having is that the produced file will out open, when the original file opens just fine. Below is a walkthrough of what I have found.

Code being used. I simplified it to ensure nothing else was introducing the error.

var wb = new Workbook("FilewithPwProtectedStructure.xlsb");
wb.Save("FilewithPwProtectedStructureSavedFromAspose.xlsb", SaveFormat.Xlsb);

This file has the protection level of “structure”, and is protected is a password.

When opening the original file as an archive, we get the following.

image.png (2.3 KB)

This file opens without issue, and the structure is password protected. But once this file is opened then saved again by Aspose we get the following when opened as an archive.

image.png (1.6 KB)

As we can see aspose saved the file out in an encrypted format.

I would like to know if this is expected behavior, and if so how could I configure Aspose to export the file in a way that will preserve the original files internal structure.

Any help is greatly appreciated.

@imac,

Please try our latest version/fix: Aspose.Cells for .NET v21.5.6:
Aspose.Cells21.5.6 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.5.6 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.5.6 For .NetStandard20.Zip (5.5 MB)

If you still find the issue with v21.5.6, kindly zip and attach the input Excel file, we will check it soon.

@Amjad_Sahi This has seemed to fix our issue! Thank you so much for sending this over. Would you have a timeline for when this will be published into Nuget?

Thanks again!

@imac,

Good to know that your issue is resolved by the new fix. We are scheduled to publish our next official release (Aspose.Cells for .NET v21.6) in the next week. The official version will be published on both Downloads section and Nuget repos. The release date is not final though but you should check back on Friday next week.