PivotTable.ChangePivotCache Method
Changes the PivotCache of the specified PivotTable.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Sub ChangePivotCache ( _
PivotCache As Object _
)
'Usage
Dim instance As PivotTable
Dim PivotCache As Object
instance.ChangePivotCache(PivotCache)
void ChangePivotCache(
Object PivotCache
)
Parameters
PivotCache
Type: System.ObjectRequired String a PivotTable or PivotCache object that represents the new PivotCache for the specified PivotTable.
Remarks
The ChangePivotCache(Object) method can only be used with a PivotTable that uses data stored on a worksheet as its data source. A run-time error will occur if the ChangePivotCache(Object) method is used with a PivotTable that is connected to an external data source.