java.lang.IllegalStateException: End of file reached

Hi,


I have an excel file that throws exception from subject when I try to open it using following code:
InputStream stream;

try {
stream = new FileInputStream(new File(“end-of-file-reached- test.xlsx”));
} catch (IOException e) {
throw new RuntimeException(e);
}

new com.aspose.cells.Workbook(inputStream);

Excel file is attached to this post. Can You please check this?

Kind regards,
Zeljko

Hi Zeljko,


Thank you for contacting Aspose support.

Please try the scenario with the latest version of Aspose.Cells for Java 8.4.0 as I am unable to observe any exception while loading your provided spreadsheet with v8.4.0. In case the problem persists, please provide us more details of your environment such as operating system, JDK etc.

Java

InputStream stream = new FileInputStream(new File(“D:/end-of-file-reached-test.xlsx”));
Workbook book = new Workbook(stream);

Hi Babar,


I’m sorry, I attached wrong file in my first post. Please use the new one.

Thanks, Zeljko

Hi Zeljko,

Thanks for your posting and using Aspose.Cells.

We have tested this issue with the following sample code with the latest version: Aspose.Cells for Java 8.4.0 with your source Excel file. We found, it throws null pointer exception on opening it.

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-41248 - Null pointer exception on opening source xlsx file

Java

String filePath = “F:\Shak-Data-RW\Downloads\end-of-file-reached-test.xlsx”;


Workbook workbook = new Workbook(filePath);


Exception:
Exception in thread “main” java.lang.NullPointerException
at com.aspose.cells.zacu.d(Unknown Source)
at com.aspose.cells.zacu.b(Unknown Source)
at com.aspose.cells.zade.k(Unknown Source)
at com.aspose.cells.zade.a(Unknown Source)
at com.aspose.cells.zadd.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at ClsAsposeTest.f1(ClsAsposeTest.java:449)
at ClsAsposeTest.main(ClsAsposeTest.java:43)

Hi,

Thanks for using Aspose.Cells.

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

Hi Shakeel,


I’ve tested Your fix and I can confirm that it works fine.

Thanks, Zeljko

Hi Zeljko,


It is good to know you are up & running again. Please feel free to get in touch if you need our further assistance with Aspose APIs.

The issues you have found earlier (filed as CELLSJAVA-41248) have been fixed in this update.


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