Apache POI,同时使用 XSSF 和 HSSF [英] Apache POI, using both XSSF and HSSF
问题描述
我的 Apache POI 项目有问题.
I have a problem with Apache POI project.
我未能在 相同 Java 类" 中使用 XSSF
和 HSSF
.我应该下载哪个 jar 或者我应该将哪个工件添加到 maven 中?
I failed to use XSSF
and HSSF
in the "Same Java Class". Which jar should I download or which artifact should I get add into maven?
我想同时处理 xls
和 xlsx
文件.当我收到excel版本错误时,我会将XSSF更改为HSSF或将HSSF更改为XSSF.
I want to handle both xls
and xlsx
files at the same time. When I get excel version error, I will change the XSSF to HSSF or HSSF to XSSF.
我该怎么做?
推荐答案
与其这样做,不如尝试使用新版本的 Apache POI 3.7,它有一个 SS 包,可以同时处理 HSSF 和 XSSF 而无需担心类型
Instead of doing that, try using the new release of Apache POI 3.7, it has SS package which handles both HSSF and XSSF without worrying about type
详情请见:http://poi.apache.org/spreadsheet/index.html一个>
这篇关于Apache POI,同时使用 XSSF 和 HSSF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!