SlicerCollection

SlicerCollection class

Specifies the collection of all the Slicer objects on the specified worksheet.

class SlicerCollection;

Methods

MethodDescription
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:

ParameterTypeDescription
indexnumber

Returns

Slicer

get(string)

Gets the Slicer by slicer’s name.

get(name: string) : Slicer;

Parameters:

ParameterTypeDescription
namestring

Returns

Slicer

remove(Slicer)

Remove the specified Slicer

remove(slicer: Slicer) : void;

Parameters:

ParameterTypeDescription
slicerSlicerThe Slicer object

removeAt(number)

Deletes the Slicer at the specified index

removeAt(index: number) : void;

Parameters:

ParameterTypeDescription
indexnumberThe 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:

ParameterTypeDescription
pivotPivotTablePivotTable object
destCellNamestringThe cell in the upper-left corner of the Slicer range.
baseFieldNamestringThe 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:

ParameterTypeDescription
pivotPivotTablePivotTable object
rownumberRow index of the cell in the upper-left corner of the Slicer range.
columnnumberColumn index of the cell in the upper-left corner of the Slicer range.
baseFieldNamestringThe 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:

ParameterTypeDescription
pivotPivotTablePivotTable object
rownumberRow index of the cell in the upper-left corner of the Slicer range.
columnnumberColumn index of the cell in the upper-left corner of the Slicer range.
baseFieldIndexnumberThe 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:

ParameterTypeDescription
pivotPivotTablePivotTable object
destCellNamestringThe cell in the upper-left corner of the Slicer range.
baseFieldIndexnumberThe 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:

ParameterTypeDescription
pivotPivotTablePivotTable object
rownumberRow index of the cell in the upper-left corner of the Slicer range.
columnnumberColumn index of the cell in the upper-left corner of the Slicer range.
baseFieldPivotFieldThe 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:

ParameterTypeDescription
pivotPivotTablePivotTable object
destCellNamestringThe cell in the upper-left corner of the Slicer range.
baseFieldPivotFieldThe 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:

ParameterTypeDescription
tableListObjectListObject object
indexnumberThe index of ListColumn in ListObject.ListColumns
destCellNamestringThe 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:

ParameterTypeDescription
tableListObjectListObject object
listColumnListColumnThe ListColumn in ListObject.ListColumns
destCellNamestringThe 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:

ParameterTypeDescription
tableListObjectListObject object
listColumnListColumnThe ListColumn in ListObject.ListColumns
rownumberRow index of the cell in the upper-left corner of the Slicer range.
columnnumberColumn 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;