[JAVA] Poi the role of each jar package

Source: Internet
Author: User

Currently the latest release of POI is 3.10_final. This version of the jar package is protected by:

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


A lot of people are confused about the poi so many jars should be imported in the end.

In fact, many times we only use POI to manipulate Excel. Even use the XLS format only.

Then there is no need to import all of them. Please refer to the following for the specific jar package you should use:

Component Map

The Apache POI Distribution consists of support for many document file formats. This are provided in several Jar files. Not all of the Jars is 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
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 are 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

When we use the XLS format only, we can import Poi-version-yyyymmdd.jar.

When we also want to use the xlsx format, we also import Poi-ooxml-version-yyyymmdd.jar.

As for Poi-ooxml-schemas-version-yyyymmdd.jar, this jar is less likely to be used.

We need to use Poi-scratchpad-version-yyyymmdd.jar when we need to manipulate word, PPT, viso, Outlook, and so on .

[JAVA] Poi the role of each jar package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.