[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISlicerPivotTables.Item

this Property

this[int]

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

Declaration
IPivotTable this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As IPivotTable
Parameters
Type Name Description
int index

The index of the PivotTable reference in the slicer cache, starting at 0.

Property Value
Type Description
IPivotTable

The PivotTable reference at the specified index in the slicer cache.

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");
IPivotTable firstPivotTable = cache.PivotTables[0];