title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
PivotTable.ClearTable method (Excel) |
vbaxl10.chm235162 |
|
|
1279b0b8-3785-00b1-b91f-20e406ea1f2e |
05/08/2019 |
medium |
The ClearTable method is used for clearing a PivotTable. Clearing PivotTables includes removing all the fields and deleting all filtering and sorting applied to the PivotTables. This method resets the PivotTable to the state it had right after it was created, before any fields were added to it.
expression.ClearTable
expression A variable that represents a PivotTable object.
The ClearTable function takes no arguments and is available for both relational and OLAP PivotTables.
The following example clears a PivotTable on the active worksheet.
ActiveSheet.PivotTables(1).ClearTable()
[!includeSupport and feedback]