I would like to know, do we use Apache POI when interacting with Excel Files for Selenium Webdriver (under JUnit framework) or is there any better approach?

Let me know if further clarity is required.

Thanks, Saikat

  • It may depend on what you need to do with the Excel file. An alternative would be to convert from Excel to CSV, and then analyze the CSV. – user246 Aug 17 '12 at 1:53
  • @user246 Thank you for the reply. My requirement is to read the data from the excel and pass that as arguments to a Selenium function. – Saikat Aug 17 '12 at 12:47

I guess this link should answer all your questions.

| improve this answer | |

Yes, you can use Apache POI for interacting with Excel Files for Selenium WebDriver (under JUnit framework). You can also use TestNG instead of JUnit if anybody wants.

The following things can be done by using Apache POI:

i) Reading data from Excel (both .xls and .xlsx) ii) Writing data to Excel (both .xls and .xlsx)

You can also use JExcel for reading and writing in Excel. But the limitation is that it doesn't support .xlsx format

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.