[JAVA]POI(Apache POI)各Jar包的作用
2014-12-16 16:25
387 查看
文章来源:/article/7870040.html
Apache POI是Apache软件基金会的开放源码函式库,POI提供API给Java程序对Microsoft Office格式档案读和写的功能。
目前POI的最新发布版本是3.10_FINAL.该版本保护的jar包有:
很多人都困惑POI那么多Jar到底应该导入哪一个。
实际上很多时候我们只利用POI来操作Excel。甚至只用xls这一种格式。
那么就没有必要全部都导入了。具体应该使用哪个JAR包请参考以下内容:
The Apache POI distribution consists of support for many document file formats. This support is provided in several Jar files. Not all of the Jars are needed for every format. The following tables show the relationships between POI components, Maven repository
tags, and the project's Jar files.
当我们只要使用xls格式时、只要导入poi-version-yyyymmdd.jar就可以了。
当我们还要使用xlsx格式、还要导入poi-ooxml-version-yyyymmdd.jar。
至于poi-ooxml-schemas-version-yyyymmdd.jar这个jar基本不太会用到的。
当我们需要操作word、ppt、viso、outlook等时需要用到poi-scratchpad-version-yyyymmdd.jar。
Apache POI是Apache软件基金会的开放源码函式库,POI提供API给Java程序对Microsoft Office格式档案读和写的功能。
目前POI的最新发布版本是3.10_FINAL.该版本保护的jar包有:
Maven artifactId | Prerequisites | JAR |
---|---|---|
poi | commons-logging, commons-codec, log4j | poi-version-yyyymmdd.jar |
poi-scratchpad | poi | poi-scratchpad-version-yyyymmdd.jar |
poi-ooxml | poi, poi-ooxml-schemas | poi-ooxml-version-yyyymmdd.jar |
poi-ooxml-schemas | xmlbeans | poi-ooxml-schemas-version-yyyymmdd.jar |
poi-examples | poi, poi-scratchpad, poi-ooxml | poi-examples-version-yyyymmdd.jar |
ooxml-schemas | xmlbeans | ooxml-schemas-1.1.jar |
实际上很多时候我们只利用POI来操作Excel。甚至只用xls这一种格式。
那么就没有必要全部都导入了。具体应该使用哪个JAR包请参考以下内容:
Component Map
The Apache POI distribution consists of support for many document file formats. This support is provided in several Jar files. Not all of the Jars are needed for every format. The following tables show the relationships between POI components, Maven repositorytags, and the project's Jar files.
Component | Application type | Maven artifactId | Notes |
---|---|---|---|
POIFS | OLE2 Filesystem | poi | Required to work with OLE2 / POIFS based files |
HPSF | OLE2 Property Sets | poi | |
HSSF | Excel XLS | poi | For HSSF only, if common SS is needed see below |
HSLF | PowerPoint PPT | poi-scratchpad | |
HWPF | Word DOC | poi-scratchpad | |
HDGF | Visio VSD | poi-scratchpad | |
HPBF | Publisher PUB | poi-scratchpad | |
HSMF | Outlook MSG | poi-scratchpad | |
OpenXML4J | OOXML | poi-ooxml plus one of poi-ooxml-schemas, ooxml-schemas | Only one schemas jar is needed, see below for differences |
XSSF | Excel XLSX | poi-ooxml | |
XSLF | PowerPoint PPTX | poi-ooxml | |
XWPF | Word DOCX | poi-ooxml | |
Common SS | Excel XLS and XLSX | poi-ooxml | WorkbookFactory and friends all require poi-ooxml, not just core poi |
当我们还要使用xlsx格式、还要导入poi-ooxml-version-yyyymmdd.jar。
至于poi-ooxml-schemas-version-yyyymmdd.jar这个jar基本不太会用到的。
当我们需要操作word、ppt、viso、outlook等时需要用到poi-scratchpad-version-yyyymmdd.jar。
相关文章推荐
- 【java随记】POI各Jar包的作用
- [JAVA]POI各Jar包的作用
- 转载: [JAVA]POI各Jar包的作用
- [JAVA]POI各Jar包的作用
- [JAVA]POI各Jar包的作用
- [JAVA]POI各Jar包的作用
- 【Java技术点】POI各Jar包的作用
- java开发过程中遇到的一些jar包的作用
- 基于Java的打包jar、war、ear包的作用与区别详解
- java中常见jar包的作用
- java环境的配置,及jdk环境变量文件夹lib中的rt.jar ,dt.jar ,tool.jar作用
- java 读取excel(需要先下载poi-3.7-20101029.jar)
- Java 使用poi导入excel,结合xml文件进行数据验证的例子(增加了jar包)
- 基于Java的打包jar、war、ear包的作用与区别详解
- Java-----JDK中tools.jar、dt.jar和rt.jar的作用
- POI各Jar包的作用
- java jar包的各种作用
- 基于Java的打包jar、war、ear包的作用与区别详解
- [java] Struts、Spring、Hibernate——Jar包下载及作用
- java框架中 一些jar包的作用