Skip to content

07. Reading individual data from a XLSX workbook

Hemanth Sridhar edited this page Mar 14, 2022 · 2 revisions

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

String path = "src/test/resources/workbook.xlsx";
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.xlsx";
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.xlsx";
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.xlsx";
ExtUtils ext = new ExcelUtils(path,"sheetName");
ext.parseData();
ext.readCell(3, 1);