Delete Pivot Table from a Worksheet
Contents
[
Hide
]
Aspose.Cells for Python via .NET 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.pivot_tables.remove(pivot_table) method to delete the pivot table using pivot table object and Worksheet.pivot_tables.remove_at(index, keep_data) method to delete pivot table object using its position inside the pivot table collection.
How to Delete Pivot Table from Worksheet Using Aspose.Cells for Python Excel Library
The following sample code deletes two pivot tables from the worksheet. First it removes pivot table using Worksheet.pivot_tables.remove(pivot_table) method and then it removes pivot table using Worksheet.pivot_tables.remove_at(index, keep_data) method