Class SlicerCache (Excel VBA)

The class SlicerCache represents the current filter state for a slicer, and information about which PivotCache or WorkbookConnection object the slicer is connected to.

Class Slicer gives access to class SlicerCache.


Dim slc as SlicerCache
Set slc = ActiveWorkbook.SlicerCaches(Index:=1)

For Each

Here is an example of processing the SlicerCache items in a collection.


Dim slc As SlicerCache
For Each slc In ActiveWorkbook.SlicerCaches
	
Next slc

Methods

ClearAllFilters - Clears the filter for either slicer or timeline, depending on the slicer cache type.

ClearDateFilter - Clears the filter for a timeline (date filter).

ClearManualFilter - Clears the manual filter for the slicer cache.

Delete - Deletes the specified slicer cache and the slicers associated with it.

Properties

CrossFilterType returns or sets whether a slicer is participating in cross filtering with other slicers that share the same slicer cache, and how cross filtering is displayed.

FilterCleared returns whether the slicer or timeline filter state is cleared.

Index returns the index of the specified SlicerCache object in the SlicerCaches collection.

List true if the slicer cache is for a slicer on a table; otherwise, False.

ListObject returns a ListObject object for the QueryTable object.

Name returns or sets the name of the slicer cache.

OLAP returns whether the slicer associated with the specified slicer cache is based on an OLAP data source.

PivotTables returns a SlicerPivotTables collection that contains information about the PivotTables that the slicer cache is currently filtering.

RequireManualUpdate true when manual updates of the slicer cache are required.

ShowAllItems returns or sets whether slicers connected to the specified slicer cache display items that have been deleted from the corresponding PivotCache.

SlicerCacheLevels returns the collection of SlicerCacheLevel objects that represent the levels of an OLAP hierarchy on which the specified slicer cache is based.

SlicerCacheType returns the type of the slicer cache: slicer (xlSlicer) or timeline (xlTimeline) .

SlicerItems returns a SlicerItems collection that contains the collection of all items in the slicer cache.

Slicers returns a Slicers collection that contains the collection of Slicer objects associated with the specified SlicerCache object.

SortItems returns or sets the sort order of the items in the slicer.

SortUsingCustomLists returns or sets whether items in the specified slicer cache will be sorted by the custom lists.

SourceName returns the name of the data source that the slicer is connected to.

SourceType returns the kind of data source that the slicer is connected to.

TimelineState the timeline-specific state of the SlicerCache object.

VisibleSlicerItems returns a SlicerItems collection that contains the collection of all the visible items in the specified slicer cache.

VisibleSlicerItemsList returns or sets the list of MDX unique names for members at all levels of the hierarchy where manual filtering is applied.

WorkbookConnection gets or sets the WorkbookConnection object that represents the data connection used by the specified slicer.

ListObject - Represents a list object in the ListObjects collection.

SlicerCacheLevels - Represents the collection of hierarchy levels for the OLAP data source that is filtered by a slicer.

SlicerItems - Represents the collection of SlicerItem objects contained in a SlicerCache or SlicerCacheLevel object.

SlicerPivotTables - Represents information about the collection of PivotTables associated with the specified SlicerCache object.

Slicers - A collection of Slicer objects.

TimelineState - The timeline-specific state of a SlicerCache object.

WorkbookConnection - A connection is a set of information needed to obtain data from an external data source other than a Microsoft Excel workbook.