Hi,
We have found this issue where we cannot refresh a pivot table containing a grouped date column when the data source table is empty. We get an “Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index” error during the PivotTable.RefreshData() method call when the source table is empty. Is it possible to refresh the pivot table’s cache in this scenario without getting this error?
I have attached a small project to demonstrate the issue. I have also attached an input file “input file with grouped date.xlsx” containing a pivot table where it’s date column is grouped. The code simply opens the input file, clear all it’s ListObjects, refreshes the pivot table, before finally saving the file as “generated file.xlsx”.
I have attached a screen shot “Error when refreshing pivot table with grouping.png” of the error message that appears when debugging during the “PivotTable.RefreshData” method call.
Hi,
Hi,
We have fixed the issue.
Please download and try this fix: Aspose.Cells for .NET v7.5.2.1 and let us know your feedback.
Hi,
Thank you for providing a fix for this issue. We have downloaded the latest version of Aspose.Cells 7.5.2.1 and we no longer get the error message.
I was wondering it is possible to retain the grouping settings even after the source table is cleared (have no more data)?
Hi,
The issues you have found earlier (filed as CELLSNET-41925) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.