Free Support Forum -

Fail to open file (#1660)

I have failed to open excel file using aspose.cells 17.11.0 for java. Can you help me with this? I attached two files with the same error.

First file:

    String path = "Sec_forms_2014_3.xls";
    Workbook workbook = new Workbook(path);

Second file:

    String path = "Inscription-Salon-Habitat-Energie-2016-VOTRE-NOM.xls";
    Workbook workbook = new Workbook(path); (132.4 KB)



Thanks for the template files.

Please try our latest version/fix:

I have used v18.4.1 and I could only find the second issue with the second file. The first file works fine with it.
I found an exception “java.lang.IllegalStateException: Invalid encoding: null” when loading the XLS file.
Sample code:

String path = "Inscription-Salon-Habitat-Energie-2016-VOTRE-NOM.xls";
Workbook workbook = new Workbook(path); 


Exception in thread “main” java.lang.IllegalStateException: Invalid encoding: null
at com.aspose.cells.Encoding.a(Unknown Source)
at com.aspose.cells.Encoding.a(Unknown Source)
at com.aspose.cells.zcbx.a(Unknown Source)
at com.aspose.cells.zcbx.T(Unknown Source)
at com.aspose.cells.zcbx.U(Unknown Source)
at com.aspose.cells.zcbx.O(Unknown Source)
at com.aspose.cells.zcbx.ak(Unknown Source)
at com.aspose.cells.zcbx.a(Unknown Source)
at com.aspose.cells.zcbx.c(Unknown Source)
at com.aspose.cells.zcbx.b(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at FailToOpenFile1.main(
Caused by: java.lang.IndexOutOfBoundsException
at java.nio.ByteBuffer.wrap(Unknown Source)

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

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


Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSJAVA-42610 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

The issues you have found earlier (filed as CELLSJAVA-42610) have been fixed in Aspose.Cells for Java 18.5. Please also see the document for your reference: