Skip to main content
.NET Framework 4.5.2+

PivotTableCollection.Remove(PivotTable) Method

Removes the specified pivot table from the collection.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v23.1.Core.dll


void Remove(
    PivotTable table


Name Type Description
table PivotTable

A PivotTable object to be removed from the collection.


Note that calling the Remove method also disposes an element removed from the collection.

To remove a pivot table at the specified index in the collection, use the PivotTableCollection.RemoveAt method. To remove all pivot tables from the collection at once, use the PivotTableCollection.Clear method.

To add a new pivot table to the collection, use the PivotTableCollection.Add method.


View Example

Worksheet worksheet = workbook.Worksheets["Report1"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Access the pivot table by its name in the collection.
PivotTable pivotTable = worksheet.PivotTables["PivotTable1"];
// Remove the pivot table from the collection.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Remove(PivotTable) method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also