Slicer

Slicer class

summary description of Slicer View

class Slicer;

Properties

PropertyTypeDescription
titlestringSpecifies the title of the current Slicer object.
alternativeTextstringReturns or sets the descriptive (alternative) text string of the Slicer object.
isPrintablebooleanIndicates whether the slicer object is printable.
isLockedbooleanIndicates whether the slicer shape is locked.
placementPlacementTypeRepresents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.
lockedAspectRatiobooleanIndicates whether locking aspect ratio.
lockedPositionbooleanIndicates whether the specified slicer can be moved or resized by using the user interface.
shapeSlicerShapeReadonly. Returns the Shape object associated with the specified slicer. Read-only.
slicerCacheSlicerCacheReadonly. Returns the SlicerCache object associated with the slicer. Read-only.
parentWorksheetReadonly. Returns the Worksheet object which contains this slicer. Read-only.
styleTypeSlicerStyleTypeSpecify the type of Built-in slicer style the default type is SlicerStyleLight1
namestringReturns or sets the name of the specified slicer
captionstringReturns or sets the caption of the specified slicer.
captionVisiblebooleanReturns or sets whether the header that displays the slicer Caption is visible the default value is true
numberOfColumnsnumberReturns or sets the number of columns in the specified slicer.
leftPixelnumberReturns or sets the horizontal offset of slicer shape from its left column, in pixels.
topPixelnumberReturns or sets the vertical offset of slicer shape from its top row, in pixels.
widthnumberReturns or sets the width of the specified slicer, in points.
widthPixelnumberReturns or sets the width of the specified slicer, in pixels.
heightnumberReturns or sets the height of the specified slicer, in points.
heightPixelnumberReturns or sets the height of the specified slicer, in pixels.
columnWidthPixelnumberGets or sets the width of each column in the slicer, in unit of pixels.
columnWidthnumberReturns or sets the width, in points, of each column in the slicer.
rowHeightPixelnumberReturns or sets the height, in pixels, of each row in the specified slicer.
rowHeightnumberReturns or sets the height, in points, of each row in the specified slicer.

Methods

MethodDescription
getTitle()@deprecated. Please use the ’title’ property instead. Specifies the title of the current Slicer object.
setTitle(string)@deprecated. Please use the ’title’ property instead. Specifies the title of the current Slicer object.
getAlternativeText()@deprecated. Please use the ‘alternativeText’ property instead. Returns or sets the descriptive (alternative) text string of the Slicer object.
setAlternativeText(string)@deprecated. Please use the ‘alternativeText’ property instead. Returns or sets the descriptive (alternative) text string of the Slicer object.
isPrintable()@deprecated. Please use the ‘isPrintable’ property instead. Indicates whether the slicer object is printable.
setIsPrintable(boolean)@deprecated. Please use the ‘isPrintable’ property instead. Indicates whether the slicer object is printable.
isLocked()@deprecated. Please use the ‘isLocked’ property instead. Indicates whether the slicer shape is locked.
setIsLocked(boolean)@deprecated. Please use the ‘isLocked’ property instead. Indicates whether the slicer shape is locked.
getPlacement()@deprecated. Please use the ‘placement’ property instead. 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)@deprecated. Please use the ‘placement’ property instead. 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()@deprecated. Please use the ’lockedAspectRatio’ property instead. Indicates whether locking aspect ratio.
setLockedAspectRatio(boolean)@deprecated. Please use the ’lockedAspectRatio’ property instead. Indicates whether locking aspect ratio.
getLockedPosition()@deprecated. Please use the ’lockedPosition’ property instead. Indicates whether the specified slicer can be moved or resized by using the user interface.
setLockedPosition(boolean)@deprecated. Please use the ’lockedPosition’ property instead. Indicates whether the specified slicer can be moved or resized by using the user interface.
getShape()@deprecated. Please use the ‘shape’ property instead. Returns the Shape object associated with the specified slicer. Read-only.
getSlicerCache()@deprecated. Please use the ‘slicerCache’ property instead. Returns the SlicerCache object associated with the slicer. Read-only.
getParent()@deprecated. Please use the ‘parent’ property instead. Returns the Worksheet object which contains this slicer. Read-only.
getStyleType()@deprecated. Please use the ‘styleType’ property instead. Specify the type of Built-in slicer style the default type is SlicerStyleLight1
setStyleType(SlicerStyleType)@deprecated. Please use the ‘styleType’ property instead. Specify the type of Built-in slicer style the default type is SlicerStyleLight1
getName()@deprecated. Please use the ’name’ property instead. Returns or sets the name of the specified slicer
setName(string)@deprecated. Please use the ’name’ property instead. Returns or sets the name of the specified slicer
getCaption()@deprecated. Please use the ‘caption’ property instead. Returns or sets the caption of the specified slicer.
setCaption(string)@deprecated. Please use the ‘caption’ property instead. Returns or sets the caption of the specified slicer.
getCaptionVisible()@deprecated. Please use the ‘captionVisible’ property instead. Returns or sets whether the header that displays the slicer Caption is visible the default value is true
setCaptionVisible(boolean)@deprecated. Please use the ‘captionVisible’ property instead. Returns or sets whether the header that displays the slicer Caption is visible the default value is true
getNumberOfColumns()@deprecated. Please use the ’numberOfColumns’ property instead. Returns or sets the number of columns in the specified slicer.
setNumberOfColumns(number)@deprecated. Please use the ’numberOfColumns’ property instead. Returns or sets the number of columns in the specified slicer.
getLeftPixel()@deprecated. Please use the ’leftPixel’ property instead. Returns or sets the horizontal offset of slicer shape from its left column, in pixels.
setLeftPixel(number)@deprecated. Please use the ’leftPixel’ property instead. Returns or sets the horizontal offset of slicer shape from its left column, in pixels.
getTopPixel()@deprecated. Please use the ’topPixel’ property instead. Returns or sets the vertical offset of slicer shape from its top row, in pixels.
setTopPixel(number)@deprecated. Please use the ’topPixel’ property instead. Returns or sets the vertical offset of slicer shape from its top row, in pixels.
getWidth()@deprecated. Please use the ‘width’ property instead. Returns or sets the width of the specified slicer, in points.
setWidth(number)@deprecated. Please use the ‘width’ property instead. Returns or sets the width of the specified slicer, in points.
getWidthPixel()@deprecated. Please use the ‘widthPixel’ property instead. Returns or sets the width of the specified slicer, in pixels.
setWidthPixel(number)@deprecated. Please use the ‘widthPixel’ property instead. Returns or sets the width of the specified slicer, in pixels.
getHeight()@deprecated. Please use the ‘height’ property instead. Returns or sets the height of the specified slicer, in points.
setHeight(number)@deprecated. Please use the ‘height’ property instead. Returns or sets the height of the specified slicer, in points.
getHeightPixel()@deprecated. Please use the ‘heightPixel’ property instead. Returns or sets the height of the specified slicer, in pixels.
setHeightPixel(number)@deprecated. Please use the ‘heightPixel’ property instead. Returns or sets the height of the specified slicer, in pixels.
getColumnWidthPixel()@deprecated. Please use the ‘columnWidthPixel’ property instead. Gets or sets the width of each column in the slicer, in unit of pixels.
setColumnWidthPixel(number)@deprecated. Please use the ‘columnWidthPixel’ property instead. Gets or sets the width of each column in the slicer, in unit of pixels.
getColumnWidth()@deprecated. Please use the ‘columnWidth’ property instead. Returns or sets the width, in points, of each column in the slicer.
setColumnWidth(number)@deprecated. Please use the ‘columnWidth’ property instead. Returns or sets the width, in points, of each column in the slicer.
getRowHeightPixel()@deprecated. Please use the ‘rowHeightPixel’ property instead. Returns or sets the height, in pixels, of each row in the specified slicer.
setRowHeightPixel(number)@deprecated. Please use the ‘rowHeightPixel’ property instead. Returns or sets the height, in pixels, of each row in the specified slicer.
getRowHeight()@deprecated. Please use the ‘rowHeight’ property instead. Returns or sets the height, in points, of each row in the specified slicer.
setRowHeight(number)@deprecated. Please use the ‘rowHeight’ property instead. 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.
isNull()Checks whether the implementation object is null.

title

Specifies the title of the current Slicer object.

title : string;

alternativeText

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

alternativeText : string;

isPrintable

Indicates whether the slicer object is printable.

isPrintable : boolean;

isLocked

Indicates whether the slicer shape is locked.

isLocked : boolean;

placement

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

placement : PlacementType;

lockedAspectRatio

Indicates whether locking aspect ratio.

lockedAspectRatio : boolean;

lockedPosition

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

lockedPosition : boolean;

shape

Readonly. Returns the Shape object associated with the specified slicer. Read-only.

shape : SlicerShape;

slicerCache

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

slicerCache : SlicerCache;

parent

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

parent : Worksheet;

styleType

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

styleType : SlicerStyleType;

name

Returns or sets the name of the specified slicer

name : string;

caption

Returns or sets the caption of the specified slicer.

caption : string;

captionVisible

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

captionVisible : boolean;

numberOfColumns

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

numberOfColumns : number;

leftPixel

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

leftPixel : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Left property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

topPixel

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

topPixel : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Top property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

width

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

width : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.WidthPt property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

widthPixel

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

widthPixel : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Width property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

height

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

height : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.HeightPt property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

heightPixel

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

heightPixel : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Height property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

columnWidthPixel

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

columnWidthPixel : number;

columnWidth

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

columnWidth : number;

rowHeightPixel

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

rowHeightPixel : number;

rowHeight

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

rowHeight : number;

getTitle()

@deprecated. Please use the ’title’ property instead. Specifies the title of the current Slicer object.

getTitle() : string;

setTitle(string)

@deprecated. Please use the ’title’ property instead. Specifies the title of the current Slicer object.

setTitle(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getAlternativeText()

@deprecated. Please use the ‘alternativeText’ property instead. Returns or sets the descriptive (alternative) text string of the Slicer object.

getAlternativeText() : string;

setAlternativeText(string)

@deprecated. Please use the ‘alternativeText’ property instead. Returns or sets the descriptive (alternative) text string of the Slicer object.

setAlternativeText(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isPrintable()

@deprecated. Please use the ‘isPrintable’ property instead. Indicates whether the slicer object is printable.

isPrintable() : boolean;

setIsPrintable(boolean)

@deprecated. Please use the ‘isPrintable’ property instead. Indicates whether the slicer object is printable.

setIsPrintable(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isLocked()

@deprecated. Please use the ‘isLocked’ property instead. Indicates whether the slicer shape is locked.

isLocked() : boolean;

setIsLocked(boolean)

@deprecated. Please use the ‘isLocked’ property instead. Indicates whether the slicer shape is locked.

setIsLocked(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getPlacement()

@deprecated. Please use the ‘placement’ property instead. 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)

@deprecated. Please use the ‘placement’ property instead. 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()

@deprecated. Please use the ’lockedAspectRatio’ property instead. Indicates whether locking aspect ratio.

getLockedAspectRatio() : boolean;

setLockedAspectRatio(boolean)

@deprecated. Please use the ’lockedAspectRatio’ property instead. Indicates whether locking aspect ratio.

setLockedAspectRatio(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getLockedPosition()

@deprecated. Please use the ’lockedPosition’ property instead. Indicates whether the specified slicer can be moved or resized by using the user interface.

getLockedPosition() : boolean;

setLockedPosition(boolean)

@deprecated. Please use the ’lockedPosition’ property instead. 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.

getShape()

@deprecated. Please use the ‘shape’ property instead. Returns the Shape object associated with the specified slicer. Read-only.

getShape() : SlicerShape;

Returns

SlicerShape

getSlicerCache()

@deprecated. Please use the ‘slicerCache’ property instead. Returns the SlicerCache object associated with the slicer. Read-only.

getSlicerCache() : SlicerCache;

Returns

SlicerCache

getParent()

@deprecated. Please use the ‘parent’ property instead. Returns the Worksheet object which contains this slicer. Read-only.

getParent() : Worksheet;

Returns

Worksheet

getStyleType()

@deprecated. Please use the ‘styleType’ property instead. Specify the type of Built-in slicer style the default type is SlicerStyleLight1

getStyleType() : SlicerStyleType;

Returns

SlicerStyleType

setStyleType(SlicerStyleType)

@deprecated. Please use the ‘styleType’ property instead. Specify the type of Built-in slicer style the default type is SlicerStyleLight1

setStyleType(value: SlicerStyleType) : void;

Parameters:

ParameterTypeDescription
valueSlicerStyleTypeThe value to set.

getName()

@deprecated. Please use the ’name’ property instead. Returns or sets the name of the specified slicer

getName() : string;

setName(string)

@deprecated. Please use the ’name’ property instead. Returns or sets the name of the specified slicer

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getCaption()

@deprecated. Please use the ‘caption’ property instead. Returns or sets the caption of the specified slicer.

getCaption() : string;

setCaption(string)

@deprecated. Please use the ‘caption’ property instead. Returns or sets the caption of the specified slicer.

setCaption(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getCaptionVisible()

@deprecated. Please use the ‘captionVisible’ property instead. Returns or sets whether the header that displays the slicer Caption is visible the default value is true

getCaptionVisible() : boolean;

setCaptionVisible(boolean)

@deprecated. Please use the ‘captionVisible’ property instead. 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()

@deprecated. Please use the ’numberOfColumns’ property instead. Returns or sets the number of columns in the specified slicer.

getNumberOfColumns() : number;

setNumberOfColumns(number)

@deprecated. Please use the ’numberOfColumns’ property instead. Returns or sets the number of columns in the specified slicer.

setNumberOfColumns(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftPixel()

@deprecated. Please use the ’leftPixel’ property instead. Returns or sets the horizontal offset of slicer shape from its left column, in pixels.

getLeftPixel() : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Left property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

setLeftPixel(number)

@deprecated. Please use the ’leftPixel’ property instead. 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.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Left property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

getTopPixel()

@deprecated. Please use the ’topPixel’ property instead. Returns or sets the vertical offset of slicer shape from its top row, in pixels.

getTopPixel() : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Top property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

setTopPixel(number)

@deprecated. Please use the ’topPixel’ property instead. 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.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Top property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

getWidth()

@deprecated. Please use the ‘width’ property instead. Returns or sets the width of the specified slicer, in points.

getWidth() : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.WidthPt property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

setWidth(number)

@deprecated. Please use the ‘width’ property instead. Returns or sets the width of the specified slicer, in points.

setWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.WidthPt property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

getWidthPixel()

@deprecated. Please use the ‘widthPixel’ property instead. Returns or sets the width of the specified slicer, in pixels.

getWidthPixel() : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Width property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

setWidthPixel(number)

@deprecated. Please use the ‘widthPixel’ property instead. Returns or sets the width of the specified slicer, in pixels.

setWidthPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Width property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

getHeight()

@deprecated. Please use the ‘height’ property instead. Returns or sets the height of the specified slicer, in points.

getHeight() : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.HeightPt property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

setHeight(number)

@deprecated. Please use the ‘height’ property instead. Returns or sets the height of the specified slicer, in points.

setHeight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.HeightPt property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

getHeightPixel()

@deprecated. Please use the ‘heightPixel’ property instead. Returns or sets the height of the specified slicer, in pixels.

getHeightPixel() : number;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Height property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

setHeightPixel(number)

@deprecated. Please use the ‘heightPixel’ property instead. Returns or sets the height of the specified slicer, in pixels.

setHeightPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Height property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

getColumnWidthPixel()

@deprecated. Please use the ‘columnWidthPixel’ property instead. Gets or sets the width of each column in the slicer, in unit of pixels.

getColumnWidthPixel() : number;

setColumnWidthPixel(number)

@deprecated. Please use the ‘columnWidthPixel’ property instead. Gets or sets the width of each column in the slicer, in unit of pixels.

setColumnWidthPixel(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getColumnWidth()

@deprecated. Please use the ‘columnWidth’ property instead. Returns or sets the width, in points, of each column in the slicer.

getColumnWidth() : number;

setColumnWidth(number)

@deprecated. Please use the ‘columnWidth’ property instead. Returns or sets the width, in points, of each column in the slicer.

setColumnWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getRowHeightPixel()

@deprecated. Please use the ‘rowHeightPixel’ property instead. Returns or sets the height, in pixels, of each row in the specified slicer.

getRowHeightPixel() : number;

setRowHeightPixel(number)

@deprecated. Please use the ‘rowHeightPixel’ property instead. 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()

@deprecated. Please use the ‘rowHeight’ property instead. Returns or sets the height, in points, of each row in the specified slicer.

getRowHeight() : number;

setRowHeight(number)

@deprecated. Please use the ‘rowHeight’ property instead. 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;

isNull()

Checks whether the implementation object is null.

isNull() : boolean;