博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Java 之 POI各Jar包作用
阅读量:5992 次
发布时间:2019-06-20

本文共 3513 字,大约阅读时间需要 11 分钟。

  目前POI的最新版本是 3.16-beta2,该版本是测试版本,稳定版本是 3.15,下载地址为  (http://poi.apache.org/download.html)。

一、目录结构

  目录结构如下:

  

  

  

二、详细介绍

  :https://poi.apache.org/overview.html。

Maven artifactId Prerequisites JAR Notes
poi-excelant poi,poi-ooxml poi-excelant-version.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 repository tags, and the project's Jar files.

Component Application type Maven artifactId Notes
OLE2 Filesystem poi Required to work with OLE2 / POIFS based files
OLE2 Property Sets poi  
Excel XLS poi For HSSF only, if common SS is needed see below
PowerPoint PPT poi-scratchpad  
Word DOC poi-scratchpad  
Visio VSD poi-scratchpad  
Publisher PUB poi-scratchpad  
Outlook MSG poi-scratchpad  
DDF Escher common drawings poi  
HWMF WMF drawings poi-scratchpad  
OOXML poi-ooxml plus either poi-ooxml-schemas or
ooxml-schemas and ooxml-security
See notes below for differences between these options
Excel XLSX poi-ooxml  
PowerPoint PPTX poi-ooxml  
Word DOCX poi-ooxml  
Visio VSDX poi-ooxml  
PowerPoint PPT and PPTX poi-scratchpad and poi-ooxml SL code is in the core POI jar, but implementations are in poi-scratchpad and poi-ooxml.
Excel XLS and XLSX poi-ooxml WorkbookFactory and friends all require poi-ooxml, not just core poi

  This table maps artifacts into the jar file name. "version-yyyymmdd" is the POI version stamp. You can see what the latest stamp is on the .      

Maven artifactId Prerequisites JAR
poi , , , poi-version-yyyymmdd.jar
poi-scratchpad poi-scratchpad-version-yyyymmdd.jar
poi-ooxml , poi-ooxml-version-yyyymmdd.jar
poi-ooxml-schemas poi-ooxml-schemas-version-yyyymmdd.jar
poi-examples , , poi-examples-version-yyyymmdd.jar
ooxml-schemas
ooxml-security
For signing: , , ,

  Note:Apache commons-collections4 was added as a dependency in POI 3.15 beta 3.      

  poi-ooxml requires poi-ooxml-schemas. This is a substantially smaller version of the ooxml-schemas jar (ooxml-schemas-1.3.jar for POI 3.14 or later, ooxml-schemas-1.1.jar for POI 3.7 up to POI 3.13, ooxml-schemas-1.0.jar for POI 3.5 and 3.6). The larger ooxml-schemas jar is only required for development. Similarly, the ooxml-security jar, which contains all of the classes relating to encryption and signing, is normally only required for development. A subset of its contents are in poi-ooxml-schemas. This JAR is ooxml-security-1.1.jar for POI 3.14 onwards and ooxml-security-1.0.jar prior to that.

  The OOXML jars require a stax implementation, but now that Apache POI requires Java 6, that dependency is provided by the JRE and no additional stax jars are required. The OOXML jars used to require DOM4J, but the code has now been changed to use JAXP and no additional dom4j jars are required. By the way, look at this if you have problems when using a non-Oracle JDK.

  The ooxml schemas jars are compiled with 2.3, and so can be used at runtime with any version of XMLBeans from 2.3 or newer. Wherever possible though, we recommend that you use XMLBeans 2.6.0 with Apache POI, and that is the version now shipped in the binary release packages.

  总结:按照需要导入jar包及相关依赖jar包。

  poi-3.15.jar  (excel文件生成需要)

  poi-examples-3.15.jar(官方示例,开发不需要) 

  poi-excelant-3.15.jar(不需要)

  poi-ooxml-3.15.jar(excel,word,ppt均需要)

  poi-ooxml-schemas-3.15.jar(excel需要)

  poi-scratchpad-3.15.jar(ppt,vsd,word,viso,outlook等需要)

转载地址:http://tntlx.baihongyu.com/

你可能感兴趣的文章
Cocos2d-x和时间有关的代码
查看>>
查看源代码不方便?我有利器
查看>>
JAVA 运行与开发环境配置(二)- hello java
查看>>
orm单表操作
查看>>
poj 2541 Binary Witch
查看>>
bzoj千题计划237:bzoj1492: [NOI2007]货币兑换Cash
查看>>
数据结构与算法JavaScript描述——使用队列
查看>>
python-os模块
查看>>
位运算及在java中的应用整理
查看>>
补第一阶段冲刺站立会议3(应发表日期5月15日)
查看>>
游戏优化设置
查看>>
C# 反射与dynamic最佳组合
查看>>
python列表常用方法
查看>>
深究的东西 - HTML5地理应用
查看>>
鼠标滚轮 控制作用滚动
查看>>
Connect to a Windows PC from Ubuntu via Remote Desktop Connection
查看>>
UVa11427 Expect the Expected
查看>>
HTTP MIME type
查看>>
基本文件方法
查看>>
HttpClient PostAsync/GetAsync JSON Example
查看>>