Issue with refreshing pivot table

Hi,

I want use some code to refresh pivot table within a template excel(please see the attachment), but the following code seems doesn’t work:

Workbook workbook = new Workbook();
workbook.open(“E:/temp/PivotTable-demo-1.xls”, FileFormatType.XLSX);

Worksheets worksheets = workbook.getWorksheets();
PivotTables pivotTables = worksheets.getSheet(“bbb”).getPivotTables();
System.out.println("pivotTables.size(): "+pivotTables.size());
PivotTable pivotTable = pivotTables.get(0);

System.out.println(pivotTable);

pivotTable.refreshData();
pivotTable.calculateData();
//boolean s = pivotTable.saveData();
// System.out.println(s);
workbook.save(“E:/temp/PivotTable-demo-2.xls”, FileFormatType.XLSX);

Hi,

I can find an issue using your template file. I have logged your issue into our issue tracking system with an id: CELLSJAVA-25308. We will look into your issue soon.

Thank you.

Hi,

Please try Aspose.Cells for Java v2.5.2.5.

We have fixed the issue of refreshing pivot table.

Thank you.

The issues you have found earlier (filed as 25308) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.