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
addPivotConnection(PivotTable)Adds PivotTable connection.
removePivotConnection(PivotTable)Removes PivotTable connection.
refresh()Refreshing the slicer.Meanwhile, Refreshing and Calculating relative PivotTables.

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;

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;