SaveAsODC Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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

expression.SaveAsODC(ODCFileName, Description, Keywords)

expression   Required. An expression that returns one of the objects in the Applies To list.

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.

Example

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