I have to create an application in java to help filling data in Excel file with multiple sheets. The problem is I need to call my function write every time I insert data and currently everytime it does replace my actual file by an new one.
I searched on google some answers but I could'nt find anything. Currently for testing if an Excel Sheet exist I'm doing that :
if(workbook.getSheet(Nom[0]) != null){
workbook.createSheet(Nom[0], 0);
}
But the real problem come when I only want to write in an existing Excel file :
if(file.exists() && !file.isDirectory())
workbook = Workbook.getWorkbook(file);
else
workbook = Workbook.createWorkbook(file,wbSettings);
And the method getWorkbook return Workbook type instead of WritableWorkbook.
What should I do to write in an existing Excel file ?
Thank you