SlicerCollection
SlicerCollection class
Specifies the collection of all the Slicer objects on the specified worksheet.
class SlicerCollection;
Methods
Method | Description |
---|---|
get(number) | Gets the Slicer by index. |
get(string) | Gets the Slicer by slicer’s name. |
remove(Slicer) | Remove the specified Slicer |
removeAt(number) | Deletes the Slicer at the specified index |
clear() | Clear all Slicers. |
add(PivotTable, string, string) | Add a new Slicer using PivotTable as data source |
add(PivotTable, number, number, string) | Add a new Slicer using PivotTable as data source |
add(PivotTable, number, number, number) | Add a new Slicer using PivotTable as data source |
add(PivotTable, string, number) | Add a new Slicer using PivotTable as data source |
add(PivotTable, number, number, PivotField) | Add a new Slicer using PivotTable as data source |
add(PivotTable, string, PivotField) | Add a new Slicer using PivotTable as data source |
add(ListObject, number, string) | Add a new Slicer using ListObjet as data source |
add(ListObject, ListColumn, string) | Add a new Slicer using ListObjet as data source |
add(ListObject, ListColumn, number, number) | Add a new Slicer using ListObjet as data source |
getCount() | Gets the number of elements contained in. |
isNull() | Checks whether the implementation object is null. |
get(number)
Gets the Slicer by index.
get(index: number) : Slicer;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number |
Returns
get(string)
Gets the Slicer by slicer’s name.
get(name: string) : Slicer;
Parameters:
Parameter | Type | Description |
---|---|---|
name | string |
Returns
remove(Slicer)
Remove the specified Slicer
remove(slicer: Slicer) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
slicer | Slicer | The Slicer object |
removeAt(number)
Deletes the Slicer at the specified index
removeAt(index: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
index | number | The position index in Slicer collection |
clear()
Clear all Slicers.
clear() : void;
add(PivotTable, string, string)
Add a new Slicer using PivotTable as data source
add(pivot: PivotTable, destCellName: string, baseFieldName: string) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
pivot | PivotTable | PivotTable object |
destCellName | string | The cell in the upper-left corner of the Slicer range. |
baseFieldName | string | The name of PivotField in PivotTable.BaseFields |
Returns
The new add Slicer index
add(PivotTable, number, number, string)
Add a new Slicer using PivotTable as data source
add(pivot: PivotTable, row: number, column: number, baseFieldName: string) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
pivot | PivotTable | PivotTable object |
row | number | Row index of the cell in the upper-left corner of the Slicer range. |
column | number | Column index of the cell in the upper-left corner of the Slicer range. |
baseFieldName | string | The name of PivotField in PivotTable.BaseFields |
Returns
The new add Slicer index
add(PivotTable, number, number, number)
Add a new Slicer using PivotTable as data source
add(pivot: PivotTable, row: number, column: number, baseFieldIndex: number) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
pivot | PivotTable | PivotTable object |
row | number | Row index of the cell in the upper-left corner of the Slicer range. |
column | number | Column index of the cell in the upper-left corner of the Slicer range. |
baseFieldIndex | number | The index of PivotField in PivotTable.BaseFields |
Returns
The new add Slicer index
add(PivotTable, string, number)
Add a new Slicer using PivotTable as data source
add(pivot: PivotTable, destCellName: string, baseFieldIndex: number) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
pivot | PivotTable | PivotTable object |
destCellName | string | The cell in the upper-left corner of the Slicer range. |
baseFieldIndex | number | The index of PivotField in PivotTable.BaseFields |
Returns
The new add Slicer index
add(PivotTable, number, number, PivotField)
Add a new Slicer using PivotTable as data source
add(pivot: PivotTable, row: number, column: number, baseField: PivotField) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
pivot | PivotTable | PivotTable object |
row | number | Row index of the cell in the upper-left corner of the Slicer range. |
column | number | Column index of the cell in the upper-left corner of the Slicer range. |
baseField | PivotField | The PivotField in PivotTable.BaseFields |
Returns
The new add Slicer index
add(PivotTable, string, PivotField)
Add a new Slicer using PivotTable as data source
add(pivot: PivotTable, destCellName: string, baseField: PivotField) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
pivot | PivotTable | PivotTable object |
destCellName | string | The cell in the upper-left corner of the Slicer range. |
baseField | PivotField | The PivotField in PivotTable.BaseFields |
Returns
The new add Slicer index
add(ListObject, number, string)
Add a new Slicer using ListObjet as data source
add(table: ListObject, index: number, destCellName: string) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
table | ListObject | ListObject object |
index | number | The index of ListColumn in ListObject.ListColumns |
destCellName | string | The cell in the upper-left corner of the Slicer range. |
Returns
The new add Slicer index
add(ListObject, ListColumn, string)
Add a new Slicer using ListObjet as data source
add(table: ListObject, listColumn: ListColumn, destCellName: string) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
table | ListObject | ListObject object |
listColumn | ListColumn | The ListColumn in ListObject.ListColumns |
destCellName | string | The cell in the upper-left corner of the Slicer range. |
Returns
The new add Slicer index
add(ListObject, ListColumn, number, number)
Add a new Slicer using ListObjet as data source
add(table: ListObject, listColumn: ListColumn, row: number, column: number) : number;
Parameters:
Parameter | Type | Description |
---|---|---|
table | ListObject | ListObject object |
listColumn | ListColumn | The ListColumn in ListObject.ListColumns |
row | number | Row index of the cell in the upper-left corner of the Slicer range. |
column | number | Column index of the cell in the upper-left corner of the Slicer range. |
Returns
The new add Slicer index
getCount()
Gets the number of elements contained in.
getCount() : number;
isNull()
Checks whether the implementation object is null.
isNull() : boolean;