PivotCache.SaveAsODC Method (Excel)

Saves the PivotTable cache source as an Microsoft Office Data Connection file.


expression. SaveAsODC( _ODCFileName_ , _Description_ , _Keywords_ )

expression A variable that represents a PivotCache object.


Name Required/Optional Data Type Description
ODCFileName Required String Location to save the file.
Description Optional Variant Description that will be saved in the file.
Keywords Optional Variant Space-separated keywords that can be used to search for this file.


The following example saves the cache source as an ODC file titled "ODCFile". This example assumes a PivotTable cache exists on the active worksheet.

Sub UseSaveAsODC() 
 Application.ActiveWorkbook.PivotCaches.Item(1).SaveAsODC ("ODCFile") 
End Sub

See also

PivotCache Object