[alibaba/easyexcel]3.1.1最新版解析xlsx时报错空指针(并非缺少字体那个)

2024-05-09 742 views
8

如题,最新版3.1.1解析xlsx格式的Excel表格时(表格是通过接口请求下载的),无法解析,无论是否写额外监听器。

重点是,当打开Excel表格,按 control+s 保存后。在未改变任何代码或修改表格的情况下(仅仅打开,直接保存)再运行解析,却又可以解析。因文件特殊,不能上传Excel

java.lang.NullPointerException at java.util.Objects.requireNonNull(Objects.java:203) at org.ehcache.core.EhcacheBase.checkNonNull(EhcacheBase.java:613) at org.ehcache.core.EhcacheBase.checkNonNull(EhcacheBase.java:618) at org.ehcache.core.EhcacheBase.put(EhcacheBase.java:186) at com.alibaba.excel.cache.Ehcache.get(Ehcache.java:104) at com.alibaba.excel.analysis.v07.handlers.CellTagHandler.endElement(CellTagHandler.java:68) at com.alibaba.excel.analysis.v07.handlers.sax.XlsxRowHandler.endElement(XlsxRowHandler.java:91) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) at com.alibaba.excel.analysis.v07.XlsxSaxAnalyser.parseXmlSource(XlsxSaxAnalyser.java:239) at com.alibaba.excel.analysis.v07.XlsxSaxAnalyser.execute(XlsxSaxAnalyser.java:260) at com.alibaba.excel.analysis.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:124) at com.alibaba.excel.ExcelReader.read(ExcelReader.java:63) at com.alibaba.excel.ExcelReader.read(ExcelReader.java:53) at com.al

回答

4

这个能否提供下excel 不提供无法处理,很多excel 格式不符合官方规范。

0

不知道您是否已经解决该问题?我们先暂时关闭这个问题,如果还存在问题请重新Reopen这个issue