Skip to main content

Create pivot table

Create a pivot table from a range with a header row: fields as rows, columns, values (Sum, Count, Average, Max or Min) and filters. Excel fills in the figures when the workbook is opened.

Command in the Excel toolkit · id ooa.excel/create_pivot_table · 10 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
RangeStringNoSource range including its header row; the used area of the sheet when empty.
DestinationStringNoA3Top-left cell of the pivot table.
NameStringNoPivot table name; PivotTable1, PivotTable2 … when empty.
RowsListNoFields shown down the side (header names).
ColumnsListNoFields shown across the top.
ValuesListYesFields to summarise, each as Field or Field:function, function sum (the default), count, average, max or min.
FiltersListNoFields offered as report filters above the table.
SheetStringNoSheet with the source data; active sheet when empty.
Destination sheetStringNoSheet to put the pivot table on; created when it does not exist; a new sheet named Pivot when empty.
SessionStringNoexcelWorkbook session.

Outputs​

OutputTypeWhat it is
nameStringName of the pivot table.
sheetStringSheet the pivot table is on.