[]
Gets the IPivotCache used by this PivotTable report.
The returned cache represents the source data cache associated with the PivotTable.
IPivotCache PivotCache { get; }
ReadOnly Property PivotCache As IPivotCache
worksheet.Range["A1:B4"].Value = new object[,] {
{"Product", "Sales"},
{"Apple", 100},
{"Orange", 200},
{"Pear", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotCache cache = pivotTable.PivotCache;