[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISlicerPivotTables

ISlicerPivotTables Interface

Represents the collection of IPivotTable objects associated with a specified ISlicerCache.

Use this collection to inspect, add, or remove PivotTable references controlled by the slicer cache.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface ISlicerPivotTables : IEnumerable
Public Interface ISlicerPivotTables
    Inherits IEnumerable
Examples
IRange source = worksheet.Range["A1:B3"];
source.Value = new object[,] {
    {"Product", "Amount"},
    {"A", 10},
    {"B", 20}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(source);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "PivotTable1");
ISlicerCache cache = workbook.SlicerCaches.Add(pivotTable, "Product");
ISlicerPivotTables pivotTables = cache.PivotTables;
int count = pivotTables.Count;

Properties

Name Description
Count

Gets the number of PivotTable references associated with the slicer cache.

this[int]

Gets the PivotTable reference at the specified index in the slicer cache. The index is zero-based.

Methods

Name Description
AddPivotTable(IPivotTable)

Adds the specified PivotTable to the association list for the slicer cache.

RemovePivotTable(IPivotTable)

Removes the specified PivotTable from the slicer cache association list.