hi, my application uses template files that have several sheets with pre-configured pivot tables+charts which link to tables. if i remove a sheet that has a table which is linked to a pivot table and the sheet with the pivot table i get a warning when opening in excel because the PivotCache is still referenced in the XML even though the sheets/tables are gone. i have attached a sample template and code to reproduce.
Thanks for your reporting and using Aspose.Cells for .NET.
We were able to replicate the problem using the latest version. We have logged this issue in our database.
Development team will look into this issue and fix the problems and once the issue is fixed or we have some other update relating to it, we will let you know asap.
hi, thanks for the quick turnaround. while this fix does seem to work for the sample template i attached in the first post, it now causes a causes a crash in the WorksheetCollection.RemoveAt(Int32 index) method when running on a more complicated template. please retry my original code on the attached template.
exception:
Collection was modified; enumeration operation may not execute.
at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
at Aspose.Cells.WorksheetCollection.RemoveAt(Int32 index)
Currently, I am no longer able to add PivotFields to the Data area without the following CellsException being thrown: "You could not add data field to the data fields"
I am using the attached report with the code snippet below.