Skip to content

08. Reading individual data from a XLS workbook

Hemanth Sridhar edited this page Mar 3, 2022 · 1 revision

1.Using Column name and row number from default sheet (Sheet1)

String path = "src/test/resources/workbook.xls";
ExtUtils ext = new ExcelUtils(path);
ext.parseData();
ext.readCell("columnName", 2);

2.Using Column number and row number from default sheet (Sheet1)

String path = "src/test/resources/workbook.xls";
ExtUtils ext = new ExcelUtils(path);
ext.parseData();
ext.readCell(3, 1);

3.Using Column name and row number from custom sheet name

String path = "src/test/resources/workbook.xls";
ExtUtils ext = new ExcelUtils(path,"sheetName");
ext.parseData();
ext.readCell("columnName", 2);

4.Using Column number and row number from custom sheet name

String path = "src/test/resources/workbook.xls";
ExtUtils ext = new ExcelUtils(path,"sheetName");
ext.parseData();
ext.readCell(3, 1);