Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Integration of Apache POI Java Library in a Java Project – Direct Download & Using Maven or Gradle

Posted on 02/19/2025 By admin

Hello Guys,

We have seen Introduction of Apache POI in previous post. In this post we will see below topics:

  1. Integration of apache POI libraries using Direct download
  2. Integration of apache POI libraries using Build automation tool Maven
  3. Integration of apache POI libraries using Build automation tool Gradle ( This we will see in a separate post.)

Integration of apache POI libraries using Direct download:-

You can download Apache POI libraries from its official website. See the image below:

Apache POI

Apache POI provides both source files( .java files) and compiled files ( Binary files or .class files). You should download binary files. If you are using windows or mac machine, click on file with .zip extension under Binary Distribution. If you are using Linux operating system, click on file with extension .gz under Binary Distribution. Unzip it when it is done.

Apache POI bundles all components to read/write different Microsoft documents together. So you need to identify required one and use. You will see below jars after unzipping:

If you want to read write an excel, you need poi and poi-ooxml jars. You can see components map below from Apache POI official website:

Above jar files require some supportive jar files which you can find lib and ooxml-lib folders in unzipped files.

You can refer prerequisites here:

So, You need to add all required jar files to build path. If you are using eclipse, you can add as external libraries or add to build path.

  1. Right click on Java project and navigate to Build Path – > Configure Build Path.
  2. Click on “Libraries” tab.
  3. Click on “Add External JARS…”.
  4. Navigate to location of Apache POI jars and select.
  5. Click on Apply and close button.
  6. You can see POI jars are added to build path and listed in “Referenced Libraries” folder.

You are done. A lot of steps. There are some problems in this way:

  1. We need to manually update the jar to latest versions.
  2. If we keep required jar files within project, it will increase project size and difficult to share with others.
  3. If we add as external jars, people need to download and add jar files to project in new system.
  4. Change in location of jar files will also create problems.

Worried!! Don’t be. Solution is there. Maven or Gradle.

This is the simplest way and solve all problems of maintaining jars manually. It will take care if you share project with anyone.

Step by step to integrate Apache POI libraries in a Java Maven Project:

  1. Create a maven java project.
  2. Navigate to Maven Central Repository.
  3. Search for “Apache POI”.
  4. You need to copy below dependencies:

a. poi

b. poi-ooxml

Click on Central tab and copy latest dependencies. Paste above dependencies in pom.xml of your maven project and save it. As soon as you save it, Maven will build workspace with apache poi dependencies.

pom.xml:

 4.0.0 ApachePOI ApachePOI 0.0.1-SNAPSHOT jar ApachePOI http://maven.apache.org  UTF-8    org.apache.poi poi-ooxml 4.0.1
  org.apache.poi poi 4.0.1
 


You can refer Maven Dependencies listed below in your maven project:

You are all set to use Apache POI libraries now. I tried to cover this simple topic in details as people are confused with which jar files to be used. Hope it will help you now.

In next post, we will explore more about it. Stay tuned.

In case of any doubt, suggestion or you find some mistake, feel free to let me know in comments.

#ThanksForReading

#DonateIfYouThinkMyPostsHelpYou

Uncategorized

Post navigation

Previous Post: Selenium Framework 3: Types Of Selenium Frameworks
Next Post: Postman Tutorial Part 39 – Header Presets in Postman

Related Posts

image – Make Selenium Easy Uncategorized
API Testing Tutorial Part 11 – Difference Between SOAP and Rest Web Services or API Uncategorized
Params – Make Selenium Easy Uncategorized
xpathInDOM – Make Selenium Easy Uncategorized
May 28, 2017 – Make Selenium Easy Uncategorized
May 20, 2019 – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark