FileFormatInfo says the file is encrypted when its not

Hi,


we have the following code:

String in = "/Users/waynepope/Downloads/54604-85d98ff3-c6d5-4a32-af36-d6caeb871ae9.xlsx";

FileFormatInfo info = FileFormatUtil.detectFileFormat(in);

if (info.isEncrypted()) {

System.out.print("Is encrypted");

} else {

System.out.print("Not encrypted");

}


The file is NOT encrypted but info.isEncypted() is returning true. The XLS file can be downloaded here: https://customerservices.glasscubes.com/share/s/9d8vlbb113raq82t4id707g6ng

It should be returning false


Hi Wayne,


Thank you for sharing the sample spreadsheet.

Please note, several aspects of your provided sample are protected therefore the result returned by Aspose.Cells APIs is correct. Please check the attached snapshot for your reference.

Hi,


thanks for the response. However the excel file is protected, not encrypted i.e. you do not need a password to read.

We are trying to just do the following:

FileFormatInfo info = FileFormatUtil.detectFileFormat(fileLoc);

if (!info.isEncrypted()) {

com.aspose.cells.Workbook bookd = new com.aspose.cells.Workbook(fileLoc);

bookd.save(pdf);

}


How are we meant to tell the difference between a file that is protected but read only like this and an encrypted file which we cannot generate a PDF for?

Hi Wayne,


Thank you for your response.

I understand your concerns therefore I have raised this incident with the product team under the ticket CELLSJAVA-41996. Please spare us little time to properly analyze the case and revert back with updates in this regard.
Hi,

Thabnks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for Java v9.0.4 and let us know your feedback.

Hi,


yes thats works now.
Many thanks

Hi again,


Thank you for the confirmation on the fix, It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.