Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
If you want to associate 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 check the boxes. Similarly, if you want to associate a slicer and a pivot table using the Aspose.Cells API programmatically, please use the Slicer.AddPivotConnection(PivotTable pivot) method. It will associate the slicer with the pivot table.
The following sample code loads the sample Excel file that contains an existing slicer. It accesses the slicer and then associates the slicer with the pivot table. Finally, it saves the workbook as output Excel file.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.