Workbook wb = new Workbook("/Users/admin/Me/xx.xlsx");
WorksheetCollection worksheets = wb.getWorksheets();
for ( int i = 0; i < worksheets.getCount(); i++) {
Worksheet worksheet = worksheets.get(i);
ChartCollection charts = worksheet.getCharts();
for ( int j = 0; j < charts.getCount(); j++) {
Chart chart = charts.get(j);
if (chart.getPivotSource() != null && chart.getPivotSource().length() > 0) {
chart.refreshPivotData();
}
}
}
xx.xlsx.zip (102.5 KB)
@xhaixia,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.
This issue has been logged as
CELLSNET-47235 - NullPointerException when refreshPivotData
@xhaixia,
This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-47235”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.
@xhaixia,
Please try our latest version/fix: Aspose.Cells for .NET v20.3.2 (attached)
Your issue should be fixed in it.
Let us know your feedback.
Aspose.Cells20.3.2 For .Net2_AuthenticodeSigned.Zip (5.3 MB)
Aspose.Cells20.3.2 For .Net4.0.Zip (5.3 MB)
The issues you have found earlier (filed as CELLSNET-47235) have been fixed in Aspose.Cells for .NET v20.4. This message was posted using Bugs notification tool by Amjad_Sahi