[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISlicerCaches

ISlicerCaches Interface

Represents the collection of slicer caches associated with a workbook.

Use this collection to create, retrieve, and enumerate ISlicerCache objects that are based on workbook data sources such as tables.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface ISlicerCaches : IEnumerable
Public Interface ISlicerCaches
    Inherits IEnumerable
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);
ISlicerCaches slicerCaches = workbook.SlicerCaches;
ISlicerCache slicerCache = slicerCaches.Add(table, "Category");

Properties

Name Description
Count

Gets the number of slicer caches in this collection.

This property returns the number of ISlicerCache objects in the ISlicerCaches collection associated with a workbook.

this[int]

Gets the ISlicerCache at the specified index.

Use this indexer to retrieve a slicer cache by its zero-based position in the workbook's ISlicerCaches collection.

this[string]

Gets the ISlicerCache with the specified name.

Use this indexer to retrieve a slicer cache that has already been added to the workbook's ISlicerCaches collection.

Methods

Name Description
Add(object, string, string)

Adds a new ISlicerCache object to the collection.

Creates a slicer cache based on the specified data source and field. The data source can be a supported object such as a table or PivotTable, and sourceField identifies the field used by the slicer cache.