[]
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.
public interface ISlicerPivotTables : IEnumerable
Public Interface ISlicerPivotTables
Inherits IEnumerable
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;
| 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. |
| 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. |