Could someone please help me how to append data to excel sheet. I have tried with using jxl.jar file .
But every time it creates new sheet. I want to use the existing excel sheet and need to append my data every time my test runs.
Here is the code I'm using, that creates a new sheet everytime:
Workbook aWorkBook = Workbook.getWorkbook(new File("C:/Automation/Testdata.xls"));
WritableWorkbook aCopy = Workbook.createWorkbook(new File("C:/Automation/TestResult.xls"), aWorkBook);
WritableSheet aCopySheet = aCopy.getSheet(0);//index of the needed sheet
jxl.write.Label anotherWritableCell = new jxl.write.Label(row+36, col ,"Pass");
aCopySheet.addCell(anotherWritableCell);
aCopy.write();
aCopy.close();