Skip to main content

Create PivotTable Dialog

  • 2 minutes to read

The Create PivotTable dialog allows end-users to create a PivotTable report used to explore, analyze and aggregate huge amounts of data in a worksheet.


End-users can invoke this dialog by clicking the PivotTable button on the ribbon. Add the Tables ribbon group to enable this button (refer to the Getting Started topic for details on how to provide a Ribbon UI for the SpreadsheetControl).


This dialog allows end-users to specify the data source (PivotCache.SourceRange) and the location (PivotTable.Location) for a new PivotTable report.


Currently, the SpreadsheetControl uses only worksheet data as a data source for a pivot table. External data sources (such as ODC files, OLAP cubes, relational databases, XML files, etc.) are not supported.

In the Table/Range editor, end-users can enter a cell range reference or a table name to use as a data source for the PivotTable report, or select the desired cell range in the worksheet by clicking the Collapse Dialog button.

The pivot table can be placed in a new or existing worksheet. Selecting the Existing Worksheet option enables the Location editor option. In this editor, end-users can type a cell range reference on the current worksheet to specify the pivot table’s location, or select the desired range in the worksheet by clicking the Collapse Dialog button.


Call the PivotTableCollection.Add method to create a pivot table in code. Refer to the How to: Create a Pivot Table example for details.

See Also