Updating Slicer with Golang via C++

Possible Usage Scenarios

If you want to update a slicer in Microsoft Excel by selecting or unselecting its items, it will then update the slicer table or pivot table accordingly. Please use Slicer.GetSlicerCacheItems() to select or unselect slicer items with Aspose.Cells and then call the Slicer.Refresh() method to update the slicer table or pivot table.

How to Update Slicer

The following sample code loads the sample Excel file that contains an existing slicer. It unselects the 2nd and 3rd items of the slicer and refreshes the slicer. It then saves the workbook as the output Excel file. The following screenshot shows the effect of the sample code on the sample Excel file. As you can see in the screenshot, refreshing the slicer with selected items also refreshes the pivot table accordingly.

todo:image_alt_text

Sample Code