In this article, you will see how can you download Apache POI and install it in Eclipse IDE. You will also see how to add Apache POI maven dependency into the pom.xml file to build a Maven application.
Apache POI (Poor Obfuscation Implementation) is an open-source Java API library for manipulating the various Microsoft files format such as Excel, PowerPoint, Word in Java. This article shows you the complete environment set up for the Apache POI-5.1.0 to build an application for manipulating the Microsoft Excel file (XLS and XLSX) format.
Supported Java Version for Apache POI
- Apache POI 4.0 and later require JDK version 1.8 or later.
- Apache POI 3.11 and later 3.x versions require JDK version 1.6 or later.
- Apache POI 3.5 to 3.10 required the JDK version 1.5 or later.
- Apache POI versions prior to 3.5 required JDK 1.4+.
In this article, we are going to use the Apache poi-5.1.0 version so it required JDK 1.8+
How to Install Apache POI in Eclipse?
There are two ways for installing Apache POI in Eclipse IDE, based on your project type:
- Maven Project
- Stand alone Java Project
1. Apache poi Maven Project
If you are going to create a maven project for poi, then you have to add the following poi maven dependency in the pom.xml file of your project. Please note here, the poi-5.1.0 is the core module of the Apache poi that will work only for the XLS file. If you want to work with XLSX as well then you have to add both (poi-5.1.0 and poi-ooxml-5.1.0) modules.
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.1.0</version>
</dependency>
2. Apache poi standalone Java Project
If you are going to create a standalone java project for poi then you have to add the following jar files into the java classpath/build path:
- poi-5.1.0.jar
- poi-ooxml-5.1.0.jar
- poi-ooxml-lite-5.1.0.jar
- xml-apis-1.4.01.jar
- xmlbeans-5.0.2.jar
- curvesapi-1.06.jar
- SparseBitSet-1.2.jar
- commons-io-2.11.0.jar
- commons-codec-1.15.jar
- commons-collections4-4.4.jar
- commons-compress-1.21.jar
- commons-math3-3.6.1.jar
- log4j-api-2.14.1.jar
How to download Apache POI jars?
You can easily download all the above jars for Apache poi 5.1.0 in one place: Download Apache POI Jars

Steps to add poi jar files into java build path
In Eclipse, right-click on your Project > Properties > select Java Build Path > Libraries Tab > Add External JARsโฆ then choose above mention jars after that click on Apply and Close button as you can see in the below image:

How to create an Apache POI maven application?
You are going to see, how to build or create a sample poi maven application in Eclipse IDE and add the poi maven dependency:
Steps to create poi maven application
Step-1: Create a new maven project by clicking File Menu > New > Maven Project and simply clicking on the Next button as below image:
![Download and Install Apache POI in Eclipse [LATEST] 1 apache poi new maven project dialog](https://javacodepoint.com/wp-content/uploads/2021/04/2-min-4.png)
Step-2: Select the maven archetype: maven-archetype-quickstart and click on Next as below image:
![Download and Install Apache POI in Eclipse [LATEST] 2 apche poi maven archetype quickstart](https://javacodepoint.com/wp-content/uploads/2021/04/3-min-5.png)
Step-3: Provide Group Id: com.javacodepoint and Artifact Id: DemoApplication and click on the Finish button as below image:
![Download and Install Apache POI in Eclipse [LATEST] 3 apache poi creating maven project](https://javacodepoint.com/wp-content/uploads/2021/04/4-min-5.png)
Step-4: Now add the below maven dependency into the pom.xml file:
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.1.0</version>
</dependency>
Once you add the above Apache POI maven dependency, you would see the poi jars get added to your project as you can see in the below image:

Thatโs all, now you are ready with the Apache POI 5.1.0 environment setup in Eclipse IDE.
Conclusion
In this article, you have seen download and install Apache POI for manipulating the Microsoft Excel file(XLS and XLSX) format. Here you have seen we have taken the Apache poi-5.1.0 version to demonstrate it.
If you want to read and write an Excel file, visit another article here: Apache POI โ Read and Write Excel files in java.