[]
Represents the collection of memory caches for PivotTable reports in a workbook.
An IPivotCaches collection provides access to all IPivotCache
objects in the workbook. Use this interface to retrieve an existing cache by index,
get the number of caches, or create a new cache from a worksheet range or table
before creating PivotTable reports.
public interface IPivotCaches : IEnumerable<IPivotCache>, IEnumerable
Public Interface IPivotCaches
Inherits IEnumerable(Of IPivotCache), IEnumerable
worksheet.Range["A1:C4"].Value = new object[,] {
{"Product", "Category", "Amount"},
{"Carrots", "Vegetables", 1200},
{"Broccoli", "Vegetables", 850},
{"Bananas", "Fruit", 640}
};
IPivotCaches pivotCaches = workbook.PivotCaches;
IPivotCache pivotCache = pivotCaches.Create(worksheet.Range["A1:C4"]);
| Name | Description |
|---|---|
| Count | Gets the number of IPivotCache objects in this collection. Use this property to determine how many PivotTable caches are currently available in the workbook. |
| this[int] | Gets the IPivotCache at the specified index. Use this property to retrieve a PivotCache from the workbook's IPivotCaches collection after it has been created with Create(object). |
| Name | Description |
|---|---|
| Create(object) | Creates a new PivotCache from a source range or table. Use this method to build a PivotCache that can later be used to create a PivotTable. The source data must be an IRange or an ITable. |