I am trying to write data to an excel sheet using JExcel. I have an excel file placed on disk and I opened it using JExcel and then created a Writable Workbook. The Excel workbook contains sheets having pivot table. Idea is to just populate source sheets and then refresh the pivot tables. But after creating Writable Workbook, the formatting and pivot tables got away.
Here is my code snippet:
FileInputStream fileInputStream = new FileInputStream("C:\\Pivot_File_template.xls");
workbook = Workbook.getWorkbook(fileInputStream);
WorkbookSettings workbookSettings = new WorkbookSettings();
writableWorkbook = Workbook.createWorkbook(new File("C:\\Writable_Pivot_File.xls"),workbook,workbookSettings);
The file "Writable_Pivot_File.xls" just lost the orignal formatting and pivot tables. Any suggestions what I can do to maintain all the formatting and pivot tables? I am using "jxl_2.6.9.jar". Thanks in advance.