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