Slicer

Slicer class

summary description of Slicer View

class Slicer;

Properties

PropertyTypeDescription
sortOrderTypeSortOrderIndicates the type of sorting items.
showMissingbooleanIndicates whether to show items deteleted from the data source.
showTypeOfItemsWithNoDataItemsWithNoDataShowModeIndicates whether to show items deteleted from the data source.
showAllItemsbooleanIndicates whether to show all items even if there are no data or they are deleted. Default value is true;
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.
worksheetWorksheetReadonly. 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.
firstItemIndexnumberSpecifies the zero-based index of the first slicer item.
captionVisiblebooleanReturns or sets whether the header that displays the slicer Caption is visible. The default value is true
showCaptionbooleanIndicates whether the header of the slicer is visible. The default value is true
numberOfColumnsnumberReturns or sets the number of columns in the specified slicer. The default value is 1.
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 of each column in the slicer in unit of points.
rowHeightPixelnumberReturns or sets the height of each row in the specified slicer, in unit of pixels.
rowHeightnumberReturns or sets the height of each row in the specified slicer in unit of points.

Methods

MethodDescription
addPivotConnection(PivotTable)Adds PivotTable connection.
removePivotConnection(PivotTable)Removes PivotTable connection.
refresh()Refreshing the slicer. Meanwhile, Refreshing and Calculating PivotTables which this slicer based on.

sortOrderType

Indicates the type of sorting items.

sortOrderType : SortOrder;

showMissing

Indicates whether to show items deteleted from the data source.

showMissing : boolean;

Remarks

Only works when Slicer.ShowAllItems is true.

showTypeOfItemsWithNoData

Indicates whether to show items deteleted from the data source.

showTypeOfItemsWithNoData : ItemsWithNoDataShowMode;

Remarks

Only works when Slicer.ShowAllItems is true.

showAllItems

Indicates whether to show all items even if there are no data or they are deleted. Default value is true;

showAllItems : boolean;

title

Specifies the title of the current Slicer object.

title : string;

Remarks

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

alternativeText

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

alternativeText : string;

Remarks

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

isPrintable

Indicates whether the slicer object is printable.

isPrintable : boolean;

Remarks

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

isLocked

Indicates whether the slicer shape is locked.

isLocked : boolean;

Remarks

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

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;

Remarks

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

lockedAspectRatio

Indicates whether locking aspect ratio.

lockedAspectRatio : boolean;

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.GetLockedProperty() method. This property will be removed 12 months later since January 2026. Aspose apologizes for any inconvenience you may have experienced.

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;

Remarks

NOTE: This member is now obsolete. Instead, please use Slicer.Worksheet property. This property will be removed 12 months later since January 2026. Aspose apologizes for any inconvenience you may have experienced.

worksheet

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

worksheet : 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;

firstItemIndex

Specifies the zero-based index of the first slicer item.

firstItemIndex : number;

captionVisible

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

captionVisible : boolean;

Remarks

NOTE: This member is now obsolete. Instead, please use Slicer.ShowCaption property. This property will be removed 12 months later since January 2026. Aspose apologizes for any inconvenience you may have experienced.

showCaption

Indicates whether the header of the slicer is visible. The default value is true

showCaption : boolean;

numberOfColumns

Returns or sets the number of columns in the specified slicer. The default value is 1.

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 of each column in the slicer in unit of points.

columnWidth : number;

rowHeightPixel

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

rowHeightPixel : number;

rowHeight

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

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 PivotTables which this slicer based on.

refresh() : void;