wb.slicers
WorkbookSlicers
Sub-API for workbook-scoped slicer operations.
8 methods
list
→ Promise<SlicerInfo[]>list(): Promise<SlicerInfo[]>;List all slicers across all sheets in the workbook. @returns Array of slicer summary information
get
→ Promise<Slicer | null>get(slicerId: string): Promise<Slicer | null>;| Parameter | Type | Required |
|---|---|---|
| slicerId | string | required |
Get a slicer by ID from any sheet. @param slicerId - ID of the slicer @returns Full slicer state, or null if not found
getItemAt
→ Promise<SlicerInfo | null>getItemAt(index: number): Promise<SlicerInfo | null>;| Parameter | Type | Required |
|---|---|---|
| index | number | required |
Get a slicer by its zero-based index in the list. @param index - Zero-based index of the slicer @returns Slicer summary information, or null if index is out of range
getItems
→ Promise<SlicerItem[]>getItems(slicerId: string): Promise<SlicerItem[]>;| Parameter | Type | Required |
|---|---|---|
| slicerId | string | required |
Get the items (values) available in a slicer by ID. @param slicerId - ID of the slicer @returns Array of slicer items with selection state
getItem
→ Promise<SlicerItem>getItem(slicerId: string, key: CellValue): Promise<SlicerItem>;| Parameter | Type | Required |
|---|---|---|
| slicerId | string | required |
| key | CellValue | required |
Get a slicer item by its string key. @param slicerId - ID of the slicer @param key - The value to look up (matched via string coercion) @returns The matching slicer item @throws KernelError if no item matches the key
getItemOrNullObject
→ Promise<SlicerItem | null>getItemOrNullObject(slicerId: string, key: CellValue): Promise<SlicerItem | null>;| Parameter | Type | Required |
|---|---|---|
| slicerId | string | required |
| key | CellValue | required |
Get a slicer item by its string key, or null if not found. @param slicerId - ID of the slicer @param key - The value to look up (matched via string coercion) @returns The matching slicer item, or null if not found
remove
→ Promise<void>remove(slicerId: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| slicerId | string | required |
Remove a slicer by ID from any sheet. @param slicerId - ID of the slicer to remove
getCount
→ Promise<number>getCount(): Promise<number>;Get the total count of slicers across all sheets. @returns Number of slicers in the workbook