|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)
Use PivotTables(index), where index is the PivotTable index number or name, to return a single PivotTable object.
Because PivotTable report programming can be complex, it’s generally easiest to record PivotTable report actions and then revise the recorded code. To record a macro, point to Macro on the Tools menu and then click Record New Macro.