Removing Slicer

Possible Usage Scenarios

If you want to remove a slicer in Microsoft Excel, just select it and press the Delete button. Similarly, if you want to remove it programmatically using the Aspose.Cells API, please use the Worksheet.getSlicers().remove() method. It will remove the slicer from the worksheet.

Removing Slicer

The following sample code loads the sample Excel file that contains an existing slicer. It accesses the slicers and then removes it. Finally, it saves the workbook as output Excel file. The following screenshot shows the slicer that will be removed after executing the sample code.

todo:image_alt_text

Sample Code