Read excel file in selenium using JExcel

Read excel file in selenium

Hello Welcome in this post we will see how to Read excel file in selenium using Jexcel.

As we, all know Selenium support only browser automation, so for reading and writing with Excel files we have to user third party API like JExcel and Apache POI.

JExcel- JExcel is free API to work with Excel files; it comes with predefined method, classes and interface, which we can directly use.

Limitation of JExcel- It only support .xls files it means files whose extension is .xls files 


some useful classes and interface, which we will be using
Workbook (Class) – Will handle workbook.

Sheet (Interface) – Which will handle sheets

Cell (Interface) – Which will handle cell

Download JExcel API

Open any browser and navigate to below URL


Download zip file and extract the same. After extraction, you will get jexcel.jar file.


Read excel file in selenium

Read excel file in selenium


 Add JExcel jar to project

Right Click on project then Click on Build path> then Click on configure build path then Go to Library Section then
Click on add external jars and now attach jar file click on Apply finally click on  Save button


Program- Read excel file in selenium-  Youtube

Create a separate package  into src package

ExcelRead> create a new Class TestRead

Thanks for visiting my blog. Keep in touch.


  1. Ram Narayan
  2. Heena Kothari
  3. Brahma
  4. Arcillas Jether
  5. Kiran Bagisetty
  6. Ravi
  7. Fan
  8. Priya
  9. Maheeh
  10. paramesh