Reprint: [Java]poi the role of each jar package

Source: Internet
Author: User

Reprinted from http://blog.csdn.net/szwangdf/article/details/39053859

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 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 are 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.

Reprint: [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.