Unable to re-save excel file with two or more Slicers

Hi,

I am unable to refresh the contents of a Pivot table if for this pivot table I have two or more slicers, it is ok if I have only one slicer.
Please see the attached project and follow these steps:
1. Run the attached solution
2. Click the button to pick the file I also attached (Book1.xlsx), it has the pivot table and two slicers.
3. You will get an exception (Index was out of range. Must be non-negative and less than the size of the collection.) when calling the RefreshData and now the resulting file is corrupted.

I tested with the latest version Aspoce.Cells 8.3.1

Thanks

Hi Frank,


Thanks for your inquiry. Since your query is related to Aspose.Cells API, I am moving this thread in Aspose.Cells forum where you’ll be guided appropriately.

Best regards,

Hi Frank,

Thanks for your posting and using Aspose.Cells.

We were able to observe this exception on refreshing the pivot table using the latest version: Aspose.Cells
for .NET v8.3.1.4
.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-43312 - Index was out of range exception on refreshing pivot table

C#

string filePath = @“F:\Shak-Data-RW\Downloads\Book1.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.Worksheets[“S1”];


PivotTable pivotTable = worksheet.PivotTables[0];


//This line throws exception

pivotTable.RefreshData();


workbook.CalculateFormula(true);

workbook.Save(filePath + “.out.xlsx”);

Exception:
at System.Collections.ArrayList.get_Item(Int32 index)
at ™›.œ.get_Item(Int32 )
at Aspose.Cells.Pivot.PivotTable.‘()
at Aspose.Cells.Pivot.PivotTable.RefreshData()
A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in AsposeProject.exe

Additional information: Index was out of range. Must be non-negative and less than the size of the collection.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.3.2.3 and let us know your feedback.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.