[]
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.
IPivotCache Create(object SourceData)
Function Create(SourceData As Object) As IPivotCache
| Type | Name | Description |
|---|---|---|
| object | SourceData | The source data for the new PivotCache. This must be an IRange or an ITable; |
| Type | Description |
|---|---|
| IPivotCache | A new IPivotCache created from the specified source data. |
worksheet.Range["A1:B4"].Value = new object[,] {
{"Region", "Sales"},
{"East", 120},
{"West", 150},
{"East", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
| Type | Condition |
|---|---|
| ArgumentException |