I have searched but i didn't get any success for finding the answer to my issue. My issue is "How to add new excel sheet in existing excel file in runtime using java(jxl) in Webdriver."
I have tried using below code, used in 2 different classes.
1st sheet:
FileOutputStream fo = new FileOutputStream("./700Credit_AccProfile_FV_Results_"+cdate+".xls");
WritableWorkbook wwb = Workbook.createWorkbook(fo);
WritableSheet ws = wwb.createSheet("700Credit_FV_Zip_Results", 0);
2nd sheet:
FileOutputStream fo = new FileOutputStream("./700Credit_AccProfile_FV_Results_"+cdate+".xls");
WritableWorkbook wwb = Workbook.createWorkbook(fo);
WritableSheet ws = wwb.createSheet("700Credit_FV_City_Results", 1);
1st sheet is created successfully but while creating 2nd sheet, it is overwriting after execution is complete. I am using JXL . Please help me out with this issue. Help will be appreciated.
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/groups/opt_out.
FileOutputStream fo = new FileOutputStream("./700Credit_AccProfile_FV_Results_"+cdate+".xls"); WritableWorkbook wwb = Workbook.createWorkbook(fo); WritableSheet ws = wwb.createSheet("700Credit_FV_Zip_Results", 0);
2nd sheet:
FileOutputStream fo = new FileOutputStream("./700Credit_AccProfile_FV_Results_"+cdate+".xls");
WritableWorkbook wwb = Workbook.createWorkbook(fo);
WritableSheet ws = wwb.createSheet("700Credit_FV_City_Results", 1);
Try opening the workBook instead of creating it in second sheet.