Excel.Interfaces.SlicerData interface

An interface describing the data returned by calling slicer.toJSON().

Properties

caption

Represents the caption of slicer.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

height

Represents the height, in points, of the slicer. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value or zero as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

id

Represents the unique id of slicer. Read-only.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

isFilterCleared

True if all filters currently applied on the slicer are cleared.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

left

Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

name

Represents the name of slicer.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

nameInFormula

Represents the slicer name used in the formula.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

slicerItems

Represents the collection of SlicerItems that are part of the slicer. Read-only.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

sortBy

Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending".

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

style

Constant value that represents the Slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

top

Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

width

Represents the width, in points, of the slicer. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value or zero as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

worksheet

Represents the worksheet containing the slicer. Read-only.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

Property Details

caption

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the caption of slicer.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

caption?: string;

Property Value

string

height

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the height, in points, of the slicer. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value or zero as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

height?: number;

Property Value

number

id

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the unique id of slicer. Read-only.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

id?: string;

Property Value

string

isFilterCleared

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

True if all filters currently applied on the slicer are cleared.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

isFilterCleared?: boolean;

Property Value

boolean

left

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the distance, in points, from the left side of the slicer to the left of the worksheet. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

left?: number;

Property Value

number

name

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the name of slicer.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

name?: string;

Property Value

string

nameInFormula

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the slicer name used in the formula.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

nameInFormula?: string;

Property Value

string

slicerItems

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the collection of SlicerItems that are part of the slicer. Read-only.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

slicerItems?: Excel.Interfaces.SlicerItemData[];

Property Value

sortBy

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the sort order of the items in the slicer. Possible values are: "DataSourceOrder", "Ascending", "Descending".

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

sortBy?: Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending";

Property Value

Excel.SlicerSortType | "DataSourceOrder" | "Ascending" | "Descending"

style

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Constant value that represents the Slicer style. Possible values are: "SlicerStyleLight1" through "SlicerStyleLight6", "TableStyleOther1" through "TableStyleOther2", "SlicerStyleDark1" through "SlicerStyleDark6". A custom user-defined style present in the workbook can also be specified.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

style?: string;

Property Value

string

top

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the distance, in points, from the top edge of the slicer to the top of the worksheet. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

top?: number;

Property Value

number

width

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the width, in points, of the slicer. Throws an "The argument is invalid or missing or has an incorrect format." exception when set with negative value or zero as input.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

width?: number;

Property Value

number

worksheet

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the worksheet containing the slicer. Read-only.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

worksheet?: Excel.Interfaces.WorksheetData;

Property Value