当前位置:网站首页>神奇的POI读取excel模板文件报错
神奇的POI读取excel模板文件报错
2022-06-27 19:23:00 【高粱】
项目读取excel报错, poi版本从3.7升到4.1.2
使用高版本api
workbook = WorkbookFactory.create(inputStream);
出现无法读取的错误
Your stream was neither an OLE2 stream, nor an OOXML stream
思前想后 发现maven构建项目excel文件到target目录classes文件夹下会自动进行编译 导致poi读取文件流错误
添加排除指定文件的maven配置即可
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
<nonFilteredFileExtension>xls</nonFilteredFileExtension>
<nonFilteredFileExtension>xml</nonFilteredFileExtension>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>rar</nonFilteredFileExtension>
<nonFilteredFileExtension>properties</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
</plugins>
</build>
边栏推荐
- Ceph分布式存储
- 今晚战码先锋润和赛道第2期直播丨如何参与OpenHarmony代码贡献
- 100 important knowledge points that SQL must master: combining where clauses
- SQL必需掌握的100个重要知识点:IN 操作符
- Galaxy Kirin system LAN file sharing tutorial
- Cerebral cortex: predicting children's mathematical skills from task state and resting state brain function connections
- 划重点!国产电脑上安装字体小技巧
- Covering access to 2w+ traffic monitoring equipment, EMQ creates a new digital engine for all elements of traffic in Shenzhen
- 银河麒麟系统局域网文件共享教程
- Wechat applet based service management system for college party members' Home System applet graduation design, Party members, activists, learning, punch in, forum
猜你喜欢

White whoring red team goby & POC, how do you call white whoring?

华为伙伴暨开发者大会2022开源时刻全纪录

非常全面的DolphinScheduler(海豚调度)安装使用文档

KDD 2022 | graph neural network generalization framework under the paradigm of "pre training, prompting and fine tuning"

Use the storcli tool to configure raid. Just collect this article

Go from introduction to practice - Interface (notes)

Go从入门到实战——共享内存并发机制(笔记)

SQL必需掌握的100个重要知识点:使用函数处理数据

100 important knowledge points that SQL must master: sorting and retrieving data

Go从入门到实战——依赖管理(笔记)
随机推荐
SQL必需掌握的100个重要知识点:创建计算字段
Oracle的CTAS能不能将约束等属性带到新表?
非常全面的DolphinScheduler(海豚调度)安装使用文档
强制 20 天内开发 APP 后集体被裁,技术负责人怒批:祝“早日倒闭!”
String类的常用方法
VMware vSphere esxi 7.0 installation tutorial
关于企业数字化的展望(38/100)
The difference between scrum and Kanban
SQL必需掌握的100个重要知识点:排序检索数据
创建对象时JVM内存结构
Codeforces Round #722 (Div. 2)
专题教程——选队长游戏
Yu Wenwen, Hu Xia and other stars take you to play with the party. Pipi app ignites your summer
Go从入门到实战——仅需任意任务完成(笔记)
小王的面试训练任务
100 important knowledge points that SQL must master: using functions to process data
Unleash the innovative power of open source database | [Gansu] opengauss meetup has come to a successful conclusion
Acwing周赛57-最长连续子序列-(二分or树状数组)
Open a new ecological posture | use the wrodpress remote attachment to store it in COS
关于异常处理的知识整理