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

http://mirrors.ibiblio.org/pub/mirrors/maven/net.sourceforge.jexcelapi/jars/jxl-2.6.jar

 

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.

25 Comments

  1. Akansha Pasricha
  2. nidhi
  3. kanchana
  4. Ram Narayan
  5. Heena Kothari
  6. Brahma
  7. Arcillas Jether
  8. Kiran Bagisetty
  9. Ravi
  10. Fan
  11. Priya
  12. Maheeh
  13. paramesh

Leave a Reply