当前位置:网站首页>神奇的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 distributed storage
- Use the storcli tool to configure raid. Just collect this article
- Go从入门到实战——仅需任意任务完成(笔记)
- TreeSet详解
- Flask----应用案例
- String类的常用方法
- 银河麒麟系统局域网文件共享教程
- MySQL performance optimization index function, hidden, prefix, hash index usage (2)
- AI painting minimalist tutorial
- 100 important knowledge points that SQL must master: using functions to process data
猜你喜欢

快递e栈——数组篇小型项目

ICML2022 | 可扩展深度高斯马尔可夫随机场

MySQL performance optimization index function, hidden, prefix, hash index usage (2)

Go从入门到实战——Context与任务取消(笔记)

Go从入门到实战——package(笔记)

Go从入门到实战——接口(笔记)

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

Zhongang Mining: the largest application field of new energy or fluorite

送你12个常用函数公式,用过的都说好

SQL必需掌握的100个重要知识点:过滤数据
随机推荐
请教CMS小程序首页的幻灯片在哪里设置?
MySQL client tools are recommended. I can't imagine that it is best to use Juran
Day8 ---- 云资讯项目介绍与创建
GFS distributed file system
VMware vSphere ESXi 7.0安装教程
微服务之远程调用
Love number experiment | Issue 7 - Financial Crisis Analysis Based on random forest
01-Golang-环境搭建
Love math experiment | Issue 8 - building of Singapore house price prediction model
Serveur mandataire SQUID
本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
抖音的兴趣电商已经碰到流量天花板?
银河麒麟系统局域网文件共享教程
体验Navicat Premium 16,无限重置试用14天方法(附源码)
Share an experience of self positioning + problem solving
Go从入门到实战——共享内存并发机制(笔记)
oss上传调用的是哪个方法
How to participate in openharmony code contribution
SQL Server for循环用法
Acwing周赛57-数字操作-(思维+分解质因数)