Skip to content
Apiary

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;

optional colFields?: string[];

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

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

field: string;
optional name?: string;

name: string;

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


optional rowFields?: string[];

sheetName: string;

sourceRef: string;

sourceSheetName: string;