Remove Pivot Connection

Possible Usage Scenarios

If you want to disassociate a slicer and a pivot table in Excel, you need to right‑click the slicer and select the “Report Connections…” item. In the options list, you can toggle the check box. Similarly, if you want to disassociate a slicer and a pivot table using the Aspose.Cells API programmatically, please use the Slicer.RemovePivotConnection(PivotTable pivot) method. It will disassociate the slicer from the pivot table.

Disassociate a slicer and a pivot table

The following sample code loads the sample Excel file that contains an existing slicer. It accesses the slicers and then disassociates the slicer from the pivot table. Finally, it saves the workbook as the output Excel file.

Sample Code