Program Pivot Tables

You can navigate to pivot table objects from the Workbook, Chart, Worksheet, or Range objects as shown in Figure 13-18.

Navigating the pivot table objects

Figure 13-18. Navigating the pivot table objects

Although pivot tables expose a full set of objects, the most common set of programming tasks deal with this narrow set of problems:

  • Create a pivot table.

  • Refresh a pivot table automatically when the source data changes.

  • Build a pivot table from an external data source.

The following sections explain how to program those tasks.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.