Apache POI(Poor Obfuscation Implementation) is the Java API for the Microsoft documentation which allows to write or read files in Microsoft formats i.e word, power point & excel. It is an open source library developed & distributed by Apache software foundations to design or modify Microsoft Office files using java programs.
These libraries are used in Selenium to perform read or write operation to the excel(xls or xlsx) files.
Process to Install the Apache POI to the project library:
Step 1. To download the Apache POI Libraries, redirect to the following link– https://poi.apache.org/download.html, under the binary distribution click on the zip file.
Step 2. On the second page, click on the first link & save the file.
Step 3. Extract the downloaded file i.e. poi-4.1.1(latest available version) & check for the jar files which are used for your project.
Under the “poi-4.1.1” folder, the following jar files are found:
Under the “poi-4.1.1 > lib” path, following jar files are given:
Under the “poi-4.1.1 > ooxml-lib” path, following jar files are given:
Step 4. Go to the project in Eclipse, right click on it > go to build path > configure build path.
Step 5. Further click on the “add external jars” & select all the files given in the step 3. & click on “apply and close” button.
Note: No need to select the junit & log4j jar files given under the lib folder.
Step 6. The added jar files can be found in the project under the “referenced libraries” folder.
You can also configure build path, by making a folder name “jarfiles” to the project & copy-paste all the jars to this folder. Then, right click to the folder > build path > configure build path > select all the jar files > apply and close. In this way, all the jar files are configured under the “Referenced Libraries” folder.
In case you have any queries then feel free to ask in the comment section below.