当前位置:网站首页>【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
【已解决】记一次EasyExcel的报错【读取xls文件时全表读不报错,指定sheet名读取报错】
2022-07-06 23:56:00 【胡海龙Blog】
报错EasyExcel版本
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>2.2.3</version>
</dependency>
报错内容
java.lang.NullPointerException
at com.alibaba.excel.analysis.v03.handlers.BofRecordHandler.processRecord(BofRecordHandler.java:49)
at com.alibaba.excel.analysis.v03.XlsSaxAnalyser.processRecord(XlsSaxAnalyser.java:158)
at org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener.processRecord(MissingRecordAwareHSSFListener.java:203)
at org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener.processRecord(FormatTrackingHSSFListener.java:92)
at org.apache.poi.hssf.eventusermodel.HSSFRequest.processRecord(HSSFRequest.java:109)
at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:179)
at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:136)
at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEvents(HSSFEventFactory.java:82)
at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEvents(HSSFEventFactory.java:54)
at com.alibaba.excel.analysis.v03.XlsSaxAnalyser.execute(XlsSaxAnalyser.java:137)
at com.alibaba.excel.analysis.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:115)
at com.alibaba.excel.ExcelReader.read(ExcelReader.java:182)
at com.alibaba.excel.ExcelReader.read(ExcelReader.java:172)
at com.alibaba.excel.read.builder.ExcelReaderSheetBuilder.doRead(ExcelReaderSheetBuilder.java:65)
在使用EasyExcel读取xls格式的excel时指定sheet页读取报上面的错误,xlsx不报错
解决方案
升级到新的easyexcel版本
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.0.5</version>
</dependency>
报错解决
边栏推荐
- JVM(十九) -- 字节码与类的加载(四) -- 再谈类的加载器
- R语言【逻辑控制】【数学运算】
- Common skills and understanding of SQL optimization
- 1. AVL tree: left-right rotation -bite
- Differences and introduction of cluster, distributed and microservice
- 【oracle】简单的日期时间的格式化与排序问题
- 消息队列:如何确保消息不会丢失
- Web architecture design process
- Paper reading [open book video captioning with retrieve copy generate network]
- Design, configuration and points for attention of network arbitrary source multicast (ASM) simulation using OPNET
猜你喜欢

Use Zhiyun reader to translate statistical genetics books

Dj-zbs2 leakage relay

《5》 Table

sql优化常用技巧及理解

Pinduoduo product details interface, pinduoduo product basic information, pinduoduo product attribute interface

照片选择器CollectionView

Flink SQL realizes reading and writing redis and dynamically generates hset key

Simple case of SSM framework

Design, configuration and points for attention of network unicast (one server, multiple clients) simulation using OPNET

MySQL数据库学习(8) -- mysql 内容补充
随机推荐
Message queuing: how to ensure that messages are not lost
How Alibaba cloud's DPCA architecture works | popular science diagram
照片选择器CollectionView
Zero sequence aperture of leakage relay jolx-gs62 Φ one hundred
“多模态”概念
JVM(十九) -- 字节码与类的加载(四) -- 再谈类的加载器
batch size设置技巧
1. AVL tree: left-right rotation -bite
得物客服一站式工作台卡顿优化之路
JD commodity details page API interface, JD commodity sales API interface, JD commodity list API interface, JD app details API interface, JD details API interface, JD SKU information interface
Unity keeps the camera behind and above the player
集群、分布式、微服務的區別和介紹
基于 hugging face 预训练模型的实体识别智能标注方案:生成doccano要求json格式
C nullable type
5阶多项式轨迹
微信小程序蓝牙连接硬件设备并进行通讯,小程序蓝牙因距离异常断开自动重连,js实现crc校验位
Summary of the mean value theorem of higher numbers
The 2022 China low / no code Market Research and model selection evaluation report was released
Getting started with DES encryption
京东商品详情页API接口、京东商品销量API接口、京东商品列表API接口、京东APP详情API接口、京东详情API接口,京东SKU信息接口