Skip to content
Spreadsheet Engine

PivotAddOptions

type PivotAddOptions = object;

What PivotManager.add builds a pivot table from. anchorRef is the top-left cell of the output on sheetName, written without a sheet prefix. The field lists name source columns by header text (case-insensitive): a header may sit on the row or the column axis, not both, and may back several data fields, each with its own aggregation (default sum) and display name (default the label Excel derives, e.g. Sum of Sales).

anchorRef: string;

colFields?: string[];

dataFields?: object[];
aggregation?: PivotDataFieldAggregation;

The measure’s aggregation; Microsoft APIs call the same setting summarizeBy, while JSF stores it as subtotal.

field: string;
name?: string;

name: string;

An empty name generates the lowest free workbook-wide PivotTableN name.


rowFields?: string[];

sheetName: string;

sourceRef: string;

sourceSheetName: string;