Unknown excel content!

Thread Link:

I tried with latest API, got the same results. Is there any issue with the file encryption? or file version?


This Topic is created by shakeel.faiz using the Email to Topic plugin.

@ravindra.annapareddy

Thanks for considering Aspose.Cells.

We have logged your issue as

CELLSJAVA-42326 - com.aspose.cells.CellsException: Invalid password on opening the Excel file

Once, there is some fix or other update for you, we will let you know asap.

@ravindra.annapareddy

This is to update you that we have fixed your issue (logged earlier as “CELLSJAVA-42326”) now. We will soon provide you the fix after performing QA and incorporating other enhancements and fixes.

Thank you.

@ravindra.annapareddy

Thanks for using Aspose.Cells.

Please download and try the following fix and let us know your feedback.

Note: If the following link does not work then use the link given above. Thank you.

aspose-cells-17.6.2-java.zip (6.1 MB)

Hi Thank you for the response. I am not able to download the zip file as i am getting an error “Sorry, this file is private. Only visible to post creator and staff members.”

We cannot access dropbox either. can you send us the GIT repo link ?

@ravireddya,

We are sorry that you could not download the attachment here. I have intimated the respective team and they will be looking into the issue to figure it out soon.

By the way, could you try to download the attachment one more time if it makes any difference now. If you still find the same error, kindly share us your email id here on which we could post you the latest fix.

Thank you.

I tried again, received same error. Thanks

@ravireddya,

Kindly share your email id here on which we could post you the latest fix. We will post you a separate mail with attachment (fix) for your needs.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-42326) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

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

Hello,

Thanks for the updates, unfortunately, this is not resolved , i tried using aspose.cells-for-java-17.7 and aspose.cells-for-java-17.8 versions of the jar files and got below exception.

com.aspose.cells.CellsException: unkown excel content!
at com.aspose.cells.ztq.b(Unknown Source)
at com.aspose.cells.zsx.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)

I will attach the excel file causing this error. Please provide a fix for this at your earliest.

Thank you!

I am not seeing option to upload a file securely here, please let me know how to upload a file

@ravireddya,

Please see the screenshot for your reference on upload option:

If the file size is less than or upto 3MB, you may upload using the option. Also kindly zip the file if it is in XLSX/XLS. Moreover, if your file size is more, then kindly use some third party service options (e.g dropbox, Google drive, etc.) to upload the file there and then share the Download link here, we will check it soon.

UnknownFileCont-min.zip (17.2 KB)

Password sent in a private message

@ravireddya,

Thanks for the template file and posting encryption password for the file in a separate message.

I have tested your scenario/case using the following sample code but I got Java security exception:
i.e.,

Exception in thread “main” java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1024)
at javax.crypto.Cipher.init(Cipher.java:1345)
at javax.crypto.Cipher.init(Cipher.java:1282)
at com.aspose.cells.za.(Unknown Source)
at com.aspose.cells.ztr.a(Unknown Source)
at com.aspose.cells.ztr.a(Unknown Source)
at com.aspose.cells.zsy.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)

e.g
Sample code:

LoadOptions opts = new LoadOptions(); 
opts.setPassword(strPassword); //I set the password you posted in other message. 

Workbook wb = new Workbook("UnknownFileCont-min.xlsx", opts);

May be I need to install “Java Cryptography Extension (JCE)” policy files. I am not completely sure about it though. I am using JDK1.7 on Windows 8.

Hi,

Thanks for the test, below is my code i am using to open the file.

LoadOptions loadOptions2 = new LoadOptions();
loadOptions2.setPassword(_fileKey);
Workbook workbook = new Workbook();
workbook = new Workbook(UnknownFileCont-min.xlsx, loadOptions2);

and YES, i have below installed. please install and try.

Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

Windows and JDK versions are fine.

@ravireddya,

Could you share some link where should I install the required policy files/software. Where should I copy these files (e.g executable JARs)?. Do I need to replace the existing files @ my JDK 7 installation folder? Please provide complete details, so I could evaluate your issue precisely on our end.

See below links.

https://cwiki.apache.org/confluence/display/STONEHENGE/Installing+Java+Cryptography+Extension+(JCE)+Unlimited+Strength+Jurisdiction+Policy+Files+6

@ravireddya,

Thanks for providing us links.

I have now evaluated your issue after installing Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 6 accordingly. I observed the issue as you mentioned by using the following sample code with your template file. I found an exception “com.aspose.cells.CellsException: unkown excel content!” on instantiating the encrypted Excel file:
e.g
Sample code:

LoadOptions opts = new LoadOptions(); 
opts.setPassword("tglf4500"); 

Workbook wb = new Workbook("UnknownFileCont-min.xlsx", opts);//Exception occurred here

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

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