How to add new excel sheet in existing excel file in runtime using java (jxl) in Webdriver -


i have searched didn't success finding answer issue. issue "how 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 created while creating 2nd sheet, overwriting after execution complete. using jxl . please me out issue. appreciated.

i have modified code as, created both sheets @ time , initialized respective sheet, required. worked me.

thanks viewed or replied question.


Comments