Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PivotCaches.Create Method

Office 2007
Creates a new PivotCache.

Version Information
 Version Added:  Excel 2007

Syntax

expression.Create(SourceType, SourceData, Version)

expression   A variable that represents a PivotCaches object.

Parameters

NameRequired/OptionalData TypeDescription
SourceTypeRequiredXlPivotTableSourceTypeSourceType can be one of these xlPivotTableSourceType constants: xlConsolidation, xlDatabase, or xlExternal.
SourceDataOptionalVariantThe data for the new PivotTable cache.
VersionOptionalVariantVersion of the PivotTable. The version can be one of the xlPivotTableVersionList constants.

Return Value
PivotCache

Remarks

The following two xlPivotTableSourceType constants are not supported when creating a PivotCache using this method: xlPivotTable and xlScenario. A run-time error is returned if one of these two constants is supplied.

The SourceData argument is required if SourceType isn't xlExternal. It can be a Range object (when SourceType is either xlConsolidation or xlDatabase) or an Excel Workbook Connection object (when SourceType is xlExternal).

When not supplied, the version of the PivotTable will be xlPivotTableVersion12. The use of the xlPivotTableVersionCurrent constant is not allowed and returns a run-time error if it is supplied.




Community Additions

Show:
© 2014 Microsoft