How to Write WebTable values in Excel as Input

Hi,

I am automating through KFW , I am reading the data from WebTable, [Consist of 50 records] and I want use that Data as Input and would like to store value in Excel in particular column.  say 1st row 1 cell.

I wrote below line of code. but Test case excel file is getting corrupted.

FileInputStream fileInputStream = new FileInputStream(…xlsx filename);
XSSFWorkbook Workbook = new XSSFWorkbook(fileInputStream);
XSSFSheet sheet = Workbook.getSheet(sheetname);
for (Row Myrow : sheet) {
for (Cell Mycell : Myrow) {
XSSFCell Row = sheet.getRow(1).getCell(1);

Row.setCellValue(columnname of webtable);
}
}
FileOutputStream fileOut = new FileOutputStream(…xlsx filename);
fileOut.close();

Please let me know better approach Or better solution/code

Thanks in advance.
Shripad

shripad Default Asked on March 19, 2015 in Selenium WebDriver.

It is worked Mistake in the loop.

on March 20, 2015.
Add Comment
1 Answer(s)

It is worked Mistake in the loop.

shripad Default Answered on March 20, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.