Forum Discussion
Shashavali
3 years agoContributor
you can use the poi jar. below is the sample
first you need to copy the poi jar in the lib folder and try to execute below sample code.
String fileLocation = "H:\\Desktop\\mSSanity_SOAPUI Framework\\FMO mS_Automation_DataSheet_v1_UAT.xls"; // Change the file path.
FileInputStream fis=new FileInputStream(new File(fileLocation));
HSSFWorkbook wb=new HSSFWorkbook(fis);
HSSFSheet sheet=wb.getSheetAt(0);
Row row = sheet.getRow(0)
log.info (sheet.getPhysicalNumberOfRows())
Cell cell=row.getCell(1);
value=cell.getStringCellValue();
log.info (value)