In this article i will talk about how to setup apache POI in Selenium java project under eclipse.
Setting up Apache POI in a java – selenium project is very easy. Again as like selenium, Apache POI is a suite of jar files. So, setting up Apache POI means adding these jar files to a project. Let us see how this can be achieved.
Step1: Download Apache POI.
Step2: Extract the downloaded POI jar files.
Once zip file is downloaded from above link, extract the jar files to some location.
Step 3: Create new Java project.
To know about how to create new project, refer step 2
of below post.
Step4: Add extracted jar files in to java – selenium project.
Follow below steps to know how can we add the jar files in to a project.
First, right click on project created in step 3 here.
Then Go to “Build path” -> “Configure Build Path”
Then Click on “Add External Jar” option.
Then select all extracted jar files and click on apply and save.
That’s it, you have configured Apache POI in your java – selenium project. You can start using excel files in java -selenium project.
Follow next articles to know how to used Excel files in java – selenium project.
How to read an Excel 2007 (.xlsx) file using Apache POI
Writing Excel files using Apache POI