Slicer is provided as a new way to filter table data. It clearly indicates what data is shown in the table after filtering.
Slicer relies on table, so you must add a table first if you want to create a slicer.
You can add a slicer by using the add method, as shown in the following code:
var table = sheet.tables.findByName('table1');
var slicer = sheet.slicers.add('slicer1', 'table1', 'Name');
slicer.position(new GC.Spread.Sheets.Point(40, 180));
Slicer consists of slicer header and slicer body.
Slicer header is composed of slicer caption and clear filter button. Slicer caption is used to show a caption. The clear filter button is used to unfilter the slicer and it is inactive by default. It is active only when a slicer item is filtered .
Slicer body is composed of slicer items. There are four kinds of slicer items:
The items are divided into No Data Items and Has Data Items when they are filtered out by another slicer, or divided into Selected Items and Unselected Items when they are filtered out by themselves.