[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISlicerCache

ISlicerCache Interface

Represents the current filter state of a slicer cache and information about the data source associated with the slicer.

An ISlicerCache is created from a table or pivot table field and provides access to the slicers and slicer items that use that cache.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface ISlicerCache
Public Interface ISlicerCache
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Category", "Amount"},
    {"Fruit", 100},
    {"Vegetable", 200},
    {"Fruit", 150}
};
ITable table = worksheet.Tables.Add(worksheet.Range["A1:B4"], true);
ISlicerCache slicerCache = workbook.SlicerCaches.Add(table, "Category");

Properties

Name Description
FilterCleared

Gets whether the slicer cache filter state is cleared.

Returns true when no slicer items in the cache are excluded by filtering. This value becomes true after calling ClearAllFilters().

List

Gets whether this slicer cache is based on a table.

This property returns true when the slicer cache was created from a table data source, and false when it was created from another supported data source such as a PivotTable.

Name

Gets or sets the name of the slicer cache.

PivotTables

Gets the ISlicerPivotTables collection that contains the PivotTable objects currently filtered by the slicer cache.

Use this property to access the PivotTable objects associated with the current slicer cache.

SlicerItems

Gets the ISlicerItems collection that contains all items in the slicer cache.

Use this property to access the cached items for the slicer's source field, including items that can be retrieved by index or by item name.

Slicers

Gets the ISlicers collection associated with this ISlicerCache.

The returned collection contains the ISlicer objects that use this slicer cache.

SortItems

Gets or sets the sort order of the items in the slicer.

Use this property to retrieve whether slicer items are currently sorted in ascending or descending order.

SourceName

Gets the name of the source field that the slicer cache is connected to.

This value identifies the field in the underlying table or PivotTable data source that the slicer cache uses for filtering.

Table

Gets the table associated with the slicer cache.

Methods

Name Description
ClearAllFilters()

Clears all filters applied through this slicer cache.

This method removes the current slicer filter state and restores the display of all items according to the slicer cache type.

Delete()

Deletes this slicer cache and all ISlicer objects associated with it.

After this method is called, the slicer cache is removed from the workbook's slicer cache collection.