Fail to open excel, error for ZipFile



Input the attached file and open it
workbook = new Workbook(inputStream);

got the error:

Caused by: com.aspose.cells.CellsException: Error for ZipFile
at com.aspose.cells.zazr.a(Unknown Source)
at com.aspose.cells.a.f.zj.(Unknown Source)
at com.aspose.cells.a.f.zj.a(Unknown Source)
at com.aspose.cells.zru.a(Unknown Source)
at com.aspose.cells.zjl.a(Unknown Source)
at com.aspose.cells.zjl.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)

Thanks for help! (132.9 KB)


We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-43023 – Fail to open XLTX from stream, Exception "error for ZipFile"



While we evaluate your issue (as we logged a ticket for it), could you try loading the file using filepath, it will work fine:
Sample code:

Workbook workbook = new Workbook("f:\\files\\tf02780252.xltx");



We have tested using your provided file and found the issue was caused by Jdk’s zip APIs and cannot be fixed by Aspose.Cells. To verify this issue, please test below code without reference to or using Aspose.Cells:
Sample code:

ZipInputStream zis = new ZipInputStream(new FileInputStream("J43023.xltx"));
while(true) {
ZipEntry ze = zis.getNextEntry();
if(ze == null) {

You will also get exception by executing the code with the template file.