alibaba / easyexcel

快速、简洁、解决大文件内存溢出的java处理Excel工具
https://easyexcel.opensource.alibaba.com
Apache License 2.0
32.09k stars 7.5k forks source link

No valid entries or contents found, this is not a valid OOXML (Office Open XML) file #2600

Closed 2021404 closed 2 years ago

2021404 commented 2 years ago

建议先去看文档 快速开始常见问题 触发场景描述 easyexcel 3.0.4版本: 触发Bug的代码

   InputStream inputStream = new ClassPathResource("template/export_template.xlsx").getInputStream();
    XSSFWorkbook  workbook = new XSSFWorkbook(inputStream);

提示的异常或者没有达到的效果 org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException: No valid entries or contents found, this is not a valid OOXML (Office Open XML) file at org.apache.poi.openxml4j.util.ZipArchiveThresholdInputStream.getNextEntry(ZipArchiveThresholdInputStream.java:145) at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.(ZipInputStreamZipEntrySource.java:49) at org.apache.poi.openxml4j.opc.ZipPackage.(ZipPackage.java:106) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:307) at org.apache.poi.ooxml.util.PackageHelper.open(PackageHelper.java:47) at org.apache.poi.xssf.usermodel.XSSFWorkbook.(XSSFWorkbook.java:309)

Nobodylesszb commented 2 years ago

你好,请问解决了吗。

2021404 commented 2 years ago

我之前的问题是 excel文件有问题导致发自我的iPhone------------------ Original ------------------From: 张博 @.>Date: Thu,Jul 28,2022 10:03 AMTo: alibaba/easyexcel @.>Cc: 2021404 @.>, Author @.>Subject: Re: [alibaba/easyexcel] No valid entries or contents found, this isnot a valid OOXML (Office Open XML) file (Issue #2600) 你好,请问解决了吗。

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/alibaba/easyexcel/issues/2600#issuecomment-1197565791", "url": "https://github.com/alibaba/easyexcel/issues/2600#issuecomment-1197565791", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

zhuangjiaju commented 2 years ago

看下是不是没有读取到excel文件

Nobodylesszb commented 2 years ago

你好,解决了,问题是压缩后的excel文件格式报错了 On Aug 2, 2022, 9:09 PM +0800, Jiaju Zhuang @.***>, wrote:

看下是不是没有读取到excel文件 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>