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

Free Support Forum - aspose.com

Can not open a encrypted Excel file properly

Hi there


We are using Aspose Cells 17.1.0.
We met a Excel file that we can not open it properly with following code for test.

Workbook book;
String password = “1234”;
InputStream input = new FileInputStream(“custom/input/xlsx/encryptTest_1234.xlsx”);
if (password == null || password.isEmpty()) {
book = new Workbook(input);
} else {
LoadOptions loadOps = new LoadOptions();
loadOps.setPassword(password);
book = new Workbook(input, loadOps);
}

And there will be an Exception like this:

com.aspose.cells.CellsException: unkown excel content!
at com.aspose.cells.zub.b(Unknown Source)
at com.aspose.cells.zti.a(Unknown Source)
at com.aspose.cells.zcak.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)

Please check this Excel file in the attachment, thank you~


Craig



Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue using the latest version: Aspose.Cells for Java (Latest Version) with the following sample code and your sample file. Password protected excel file is throwing exception on loading.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSJAVA-42166 - Password protected excel file is throwing exception on loading

Java

LoadOptions opts = new LoadOptions();

opts.setPassword(“1234”);

Workbook wb = new Workbook(dirPath + “encryptTest_1234.xlsx”, opts);

wb.save(dirPath + “oj.pdf”);

Exception

Exception in thread “main” com.aspose.cells.CellsException: unkown excel content!

at com.aspose.cells.zub.b(Unknown Source)

at com.aspose.cells.zti.a(Unknown Source)

at com.aspose.cells.zcam.a(Unknown Source)

at com.aspose.cells.Workbook.(Unknown Source)

at ClsAspose.f1(ClsAspose.java:36)

at ClsAspose.main(ClsAspose.java:17)

Hi again,


This is to update you that the ticket logged earlier as CELLSJAVA-42166 has been marked resolved. We will shortly share the fix here for your testing.

Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix: Aspose.Cells for Java (Latest Version) and let us know your feedback.

Hi Shakeel.Faiz


The file can be opened correctly in Cells 17.1.4.
Thanks for your help :slight_smile:

Craig

Hi,


Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-42166) have been fixed in Aspose.Cells for Java 17.2.0.


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