Slicer
Slicer class
summary description of Slicer View
class Slicer;
Properties
| Property | Type | Description |
|---|---|---|
| sortOrderType | SortOrder | Indicates the type of sorting items. |
| showMissing | boolean | Indicates whether to show items deteleted from the data source. |
| showTypeOfItemsWithNoData | ItemsWithNoDataShowMode | Indicates whether to show items deteleted from the data source. |
| showAllItems | boolean | Indicates whether to show all items even if there are no data or they are deleted. Default value is true; |
| title | string | Specifies the title of the current Slicer object. |
| alternativeText | string | Returns or sets the descriptive (alternative) text string of the Slicer object. |
| isPrintable | boolean | Indicates whether the slicer object is printable. |
| isLocked | boolean | Indicates whether the slicer shape is locked. |
| placement | 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. |
| lockedAspectRatio | boolean | Indicates whether locking aspect ratio. |
| lockedPosition | boolean | Indicates whether the specified slicer can be moved or resized by using the user interface. |
| shape | SlicerShape | Readonly. Returns the Shape object associated with the specified slicer. Read-only. |
| slicerCache | SlicerCache | Readonly. Returns the SlicerCache object associated with the slicer. Read-only. |
| parent | Worksheet | Readonly. Returns the Worksheet object which contains this slicer. Read-only. |
| worksheet | Worksheet | Readonly. Returns the Worksheet object which contains this slicer. Read-only. |
| styleType | SlicerStyleType | Specify the type of Built-in slicer style. The default type is SlicerStyleLight1. |
| name | string | Returns or sets the name of the specified slicer |
| caption | string | Returns or sets the caption of the specified slicer. |
| firstItemIndex | number | Specifies the zero-based index of the first slicer item. |
| captionVisible | boolean | Returns or sets whether the header that displays the slicer Caption is visible. The default value is true |
| showCaption | boolean | Indicates whether the header of the slicer is visible. The default value is true |
| numberOfColumns | number | Returns or sets the number of columns in the specified slicer. The default value is 1. |
| leftPixel | number | Returns or sets the horizontal offset of slicer shape from its left column, in pixels. |
| topPixel | number | Returns or sets the vertical offset of slicer shape from its top row, in pixels. |
| width | number | Returns or sets the width of the specified slicer, in points. |
| widthPixel | number | Returns or sets the width of the specified slicer, in pixels. |
| height | number | Returns or sets the height of the specified slicer, in points. |
| heightPixel | number | Returns or sets the height of the specified slicer, in pixels. |
| columnWidthPixel | number | Gets or sets the width of each column in the slicer, in unit of pixels. |
| columnWidth | number | Returns or sets the width of each column in the slicer in unit of points. |
| rowHeightPixel | number | Returns or sets the height of each row in the specified slicer, in unit of pixels. |
| rowHeight | number | Returns or sets the height of each row in the specified slicer in unit of points. |
Methods
| Method | Description |
|---|---|
| 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:
| Parameter | Type | Description |
|---|---|---|
| pivot | PivotTable | The PivotTable object |
removePivotConnection(PivotTable)
Removes PivotTable connection.
removePivotConnection(pivot: PivotTable) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pivot | PivotTable | The PivotTable object |
refresh()
Refreshing the slicer. Meanwhile, Refreshing and Calculating PivotTables which this slicer based on.
refresh() : void;