#1 Working with Excel | Selenium C# | Read datatable from feature file | Specflow table | NPOI

preview_player
Показать описание
In this video we will go through that how we can use excel sheet in our automation framework for input/output operations.

As selenium doesn't provide any library to work with excel, so we have to install the external library (NPOI) to perform the operation on excel sheets.

To work with xls format you can use the below code.
IWorkbook workbook = new HSSFWorkbook();

And to work with xlsx format you can use the below code.
IWorkbook workbook = new XSSFWorkbook();

IWorkbook object is used to create the workbook.
IRow contains the object of row of an excel workbook.
Similarly ICell contains the object of a cell in a workbook.

Please comment in case of any query.

Also, please see other videos as well.

Рекомендации по теме
Комментарии
Автор

Hi, very informative videos, can you please make a video on excel reading and writing BOTH from excel in specflow framework please, thank you

ravipremani
welcome to shbcf.ru