.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

PivotTableCollection.Remove(PivotTable) Method

Removes the specified pivot table from the collection.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.2.Core.dll

Declaration

void Remove(
    PivotTable table
)

Parameters

Name Type Description
table PivotTable

A PivotTable object to be removed from the collection.

Remarks

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.

Example

Dim worksheet As Worksheet = workbook.Worksheets("Report1")
workbook.Worksheets.ActiveWorksheet = worksheet

' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")
' Remove the pivot table from the collection.
worksheet.PivotTables.Remove(pivotTable)

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

Note

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