Slicer

Slicer class

summary description of Slicer View

class Slicer;

Methods

MethodDescription
getTitle()Specifies the title of the current Slicer object.
setTitle(string)Specifies the title of the current Slicer object.
getAlternativeText()Returns or sets the descriptive (alternative) text string of the Slicer object.
setAlternativeText(string)Returns or sets the descriptive (alternative) text string of the Slicer object.
isPrintable()Indicates whether the slicer object is printable.
setIsPrintable(boolean)Indicates whether the slicer object is printable.
isLocked()Indicates whether the slicer shape is locked.
setIsLocked(boolean)Indicates whether the slicer shape is locked.
getPlacement()Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.
setPlacement(PlacementType)Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.
getLockedAspectRatio()Indicates whether locking aspect ratio.
setLockedAspectRatio(boolean)Indicates whether locking aspect ratio.
getLockedPosition()Indicates whether the specified slicer can be moved or resized by using the user interface.
setLockedPosition(boolean)Indicates whether the specified slicer can be moved or resized by using the user interface.
getSlicerCache()Returns the SlicerCache object associated with the slicer. Read-only.
getParent()Returns the Worksheet object which contains this slicer. Read-only.
getStyleType()Specify the type of Built-in slicer style the default type is SlicerStyleLight1
setStyleType(SlicerStyleType)Specify the type of Built-in slicer style the default type is SlicerStyleLight1
getName()Returns or sets the name of the specified slicer
setName(string)Returns or sets the name of the specified slicer
getCaption()Returns or sets the caption of the specified slicer.
setCaption(string)Returns or sets the caption of the specified slicer.
getCaptionVisible()Returns or sets whether the header that displays the slicer Caption is visible the default value is true
setCaptionVisible(boolean)Returns or sets whether the header that displays the slicer Caption is visible the default value is true
getNumberOfColumns()Returns or sets the number of columns in the specified slicer.
setNumberOfColumns(number)Returns or sets the number of columns in the specified slicer.
getLeftPixel()Returns or sets the horizontal offset of slicer shape from its left column, in pixels.
setLeftPixel(number)Returns or sets the horizontal offset of slicer shape from its left column, in pixels.
getTopPixel()Returns or sets the vertical offset of slicer shape from its top row, in pixels.
setTopPixel(number)Returns or sets the vertical offset of slicer shape from its top row, in pixels.
getWidth()Returns or sets the width of the specified slicer, in points.
setWidth(number)Returns or sets the width of the specified slicer, in points.
getWidthPixel()Returns or sets the width of the specified slicer, in pixels.
setWidthPixel(number)Returns or sets the width of the specified slicer, in pixels.
getHeight()Returns or sets the height of the specified slicer, in points.
setHeight(number)Returns or sets the height of the specified slicer, in points.
getHeightPixel()Returns or sets the height of the specified slicer, in pixels.
setHeightPixel(number)Returns or sets the height of the specified slicer, in pixels.
getColumnWidthPixel()Gets or sets the width in unit of pixels for each column of the slicer.
setColumnWidthPixel(number)Gets or sets the width in unit of pixels for each column of the slicer.
getColumnWidth()Returns or sets the width, in points, of each column in the slicer.
setColumnWidth(number)Returns or sets the width, in points, of each column in the slicer.
getRowHeightPixel()Returns or sets the height, in pixels, of each row in the specified slicer.
setRowHeightPixel(number)Returns or sets the height, in pixels, of each row in the specified slicer.
getRowHeight()Returns or sets the height, in points, of each row in the specified slicer.
setRowHeight(number)Returns or sets the height, in points, of each row in the specified slicer.
addPivotConnection(PivotTable)Adds PivotTable connection.
removePivotConnection(PivotTable)Removes PivotTable connection.
refresh()Refreshing the slicer.Meanwhile, Refreshing and Calculating relative PivotTables.

getTitle()

Specifies the title of the current Slicer object.

getTitle() : string;

setTitle(string)

Specifies the title of the current Slicer object.

setTitle(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getAlternativeText()

Returns or sets the descriptive (alternative) text string of the Slicer object.

getAlternativeText() : string;

setAlternativeText(string)

Returns or sets the descriptive (alternative) text string of the Slicer object.

setAlternativeText(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isPrintable()

Indicates whether the slicer object is printable.

isPrintable() : boolean;

setIsPrintable(boolean)

Indicates whether the slicer object is printable.

setIsPrintable(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isLocked()

Indicates whether the slicer shape is locked.

isLocked() : boolean;

setIsLocked(boolean)

Indicates whether the slicer shape is locked.

setIsLocked(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getPlacement()

Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.

getPlacement() : PlacementType;

Returns

PlacementType

setPlacement(PlacementType)

Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.

setPlacement(value: PlacementType) : void;

Parameters:

ParameterTypeDescription
valuePlacementTypeThe value to set.

getLockedAspectRatio()

Indicates whether locking aspect ratio.

getLockedAspectRatio() : boolean;

setLockedAspectRatio(boolean)

Indicates whether locking aspect ratio.

setLockedAspectRatio(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getLockedPosition()

Indicates whether the specified slicer can be moved or resized by using the user interface.

getLockedPosition() : boolean;

setLockedPosition(boolean)

Indicates whether the specified slicer can be moved or resized by using the user interface.

setLockedPosition(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getSlicerCache()

Returns the SlicerCache object associated with the slicer. Read-only.

getSlicerCache() : SlicerCache;

Returns

SlicerCache

getParent()

Returns the Worksheet object which contains this slicer. Read-only.

getParent() : Worksheet;

Returns

Worksheet

getStyleType()

Specify the type of Built-in slicer style the default type is SlicerStyleLight1

getStyleType() : SlicerStyleType;

Returns

SlicerStyleType

setStyleType(SlicerStyleType)

Specify the type of Built-in slicer style the default type is SlicerStyleLight1

setStyleType(value: SlicerStyleType) : void;

Parameters:

ParameterTypeDescription
valueSlicerStyleTypeThe value to set.

getName()

Returns or sets the name of the specified slicer

getName() : string;

setName(string)

Returns or sets the name of the specified slicer

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getCaption()

Returns or sets the caption of the specified slicer.

getCaption() : string;

setCaption(string)

Returns or sets the caption of the specified slicer.

setCaption(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getCaptionVisible()

Returns or sets whether the header that displays the slicer Caption is visible the default value is true

getCaptionVisible() : boolean;

setCaptionVisible(boolean)

Returns or sets whether the header that displays the slicer Caption is visible the default value is true

setCaptionVisible(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getNumberOfColumns()

Returns or sets the number of columns in the specified slicer.

getNumberOfColumns() : number;

setNumberOfColumns(number)

Returns or sets the number of columns in the specified slicer.

setNumberOfColumns(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftPixel()

Returns or sets the horizontal offset of slicer shape from its left column, in pixels.

getLeftPixel() : number;

setLeftPixel(number)

Returns or sets the horizontal offset of slicer shape from its left column, in pixels.

setLeftPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTopPixel()

Returns or sets the vertical offset of slicer shape from its top row, in pixels.

getTopPixel() : number;

setTopPixel(number)

Returns or sets the vertical offset of slicer shape from its top row, in pixels.

setTopPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidth()

Returns or sets the width of the specified slicer, in points.

getWidth() : number;

setWidth(number)

Returns or sets the width of the specified slicer, in points.

setWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidthPixel()

Returns or sets the width of the specified slicer, in pixels.

getWidthPixel() : number;

setWidthPixel(number)

Returns or sets the width of the specified slicer, in pixels.

setWidthPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeight()

Returns or sets the height of the specified slicer, in points.

getHeight() : number;

setHeight(number)

Returns or sets the height of the specified slicer, in points.

setHeight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeightPixel()

Returns or sets the height of the specified slicer, in pixels.

getHeightPixel() : number;

setHeightPixel(number)

Returns or sets the height of the specified slicer, in pixels.

setHeightPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getColumnWidthPixel()

Gets or sets the width in unit of pixels for each column of the slicer.

getColumnWidthPixel() : number;

setColumnWidthPixel(number)

Gets or sets the width in unit of pixels for each column of the slicer.

setColumnWidthPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getColumnWidth()

Returns or sets the width, in points, of each column in the slicer.

getColumnWidth() : number;

setColumnWidth(number)

Returns or sets the width, in points, of each column in the slicer.

setColumnWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getRowHeightPixel()

Returns or sets the height, in pixels, of each row in the specified slicer.

getRowHeightPixel() : number;

setRowHeightPixel(number)

Returns or sets the height, in pixels, of each row in the specified slicer.

setRowHeightPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getRowHeight()

Returns or sets the height, in points, of each row in the specified slicer.

getRowHeight() : number;

setRowHeight(number)

Returns or sets the height, in points, of each row in the specified slicer.

setRowHeight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

addPivotConnection(PivotTable)

Adds PivotTable connection.

addPivotConnection(pivot: PivotTable) : void;

Parameters:

ParameterTypeDescription
pivotPivotTableThe PivotTable object

removePivotConnection(PivotTable)

Removes PivotTable connection.

removePivotConnection(pivot: PivotTable) : void;

Parameters:

ParameterTypeDescription
pivotPivotTableThe PivotTable object

refresh()

Refreshing the slicer.Meanwhile, Refreshing and Calculating relative PivotTables.

refresh() : void;