Delete Pivot Table from a Worksheet
Contents
[
Hide
]
Aspose.Cells provides a feature to delete or remove Pivot Table from a Worksheet. You can delete the pivot table using pivot table object or pivot table position. Please use the Worksheet.PivotTables.Remove() method to delete the pivot table using pivot table object and Worksheet.PivotTables.RemoveAt() method to delete pivot table object using its position inside the pivot table collection.
The following sample code deletes two pivot tables from the worksheet. First it removes pivot table using Worksheet.PivotTables.Remove() method and then it removes pivot table using Worksheet.PivotTables.RemoveAt() method