Could you please help to check this issue? I have an Excel 2010, when i try to open it, it throws error: Error for ZipFile java.util.zip.ZipException: invalid block type.
Why it throws ZipFile error?
My open code is as below:
public Workbook getWorkBook(String excelPath) throws Exception{
Can you help me to understand why it throws zipfile exception when open excel file? This happened occasionally for same excel file, not every time. But I hope I can understand the root cause or possible reason.
here is my code:
Workbook wb = new Workbook(“excelpath”);
details exception is
com.aspose.cells.CellsException: Error for ZipFile
at com.aspose.cells.akw.a(Unknown Source)
at com.aspose.cells.a.f.i.(Unknown Source)
at com.aspose.cells.a.f.i.a(Unknown Source)
at com.aspose.cells.mh.a(Unknown Source)
at com.aspose.cells.Workbook.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)
Caused by: java.util.zip.ZipException: invalid block type
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:154)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
I am afraid, it is hard to say what could have caused the said problem unless we replicate the scenario first on our end. Moreover, we have looked into our issue database to find occurrences of this error com.aspose.cells.CellsException: Error for ZipFile, and was unable to find any. Most probably the issue was never reported by any other users of Aspose.Cells APIs. We would request you to please share the problematic sample here so we could properly investigate the problem cause, and provide you with information in this regard.