PivotCache.Version (Excel)

Returns the version of Microsoft Excel in which the PivotCache was created. Possible return values are xlPivotTableVersion10 - Excel 2002, xlPivotTableVersion11 - Excel 2003, xlPivotTableVersion12 - Excel 2007, xlPivotTableVersion14 - Excel 2010, xlPivotTableVersion15 - Excel 2013, xlPivotTableVersion2000 - Excel 2000, xlPivotTableVersionCurrent - Provided only for backward compatibility.

This property returns the version of the PivotTable. Default settings and behaviors depend on the version to allow for old PivotTable object model code to run in Microsoft Office Excel 2007 with the same behaviors when the version of the PivotTable corresponds to the version of Excel for which the code was written.


Dim xptVersion As XlPivotTableVersionList
xptVersion = ActiveWorkbook.PivotCaches(1).Version