Skip to content

PivotPageArea

type PivotPageArea = object;

Geometry of a pivot’s page-field (report filter) area. The area sits above the pivot’s output area, OUTSIDE ref --- Excel’s location/@ref convention excludes it --- so its row offsets, relative to the top of ref, are negative. Each page field is a caption / selected-item cell pair; the fields fill a grid rowCount rows tall by colCount column-groups wide, ending one blank spacer row above the output area (so the last row is at ref-relative row -2).

The grid is a single column by default (pageWrap 0); Excel wraps it when pageWrap is set. Adjacent column-groups are colStride columns apart (Excel uses 3: caption, value, one gap). Fields are assigned to cells in pageFields order, either down-then-over (default) or over-then-down (overThenDown); use pageFieldCellOffset to map a field index to its ref-relative cell. (A partial final group/row is expected when the field count is not a multiple of the wrap.) All verified in Excel --- see excel-test/pivot-page-area/.

colCount: number;

Number of page-field column-groups (the grid width).


colStride: number;

Columns between adjacent column-groups’ caption cells (Excel uses 3).


firstRow: number;

Ref-relative row offset of the first (top) page-field row (-(rowCount + 1)).


labelCol: number;

Ref-relative column offset of the first column-group’s caption cells.


overThenDown: boolean;

Field fill order across the grid: over-then-down when true, else down-then-over (default).


rowCount: number;

Number of rows the page area spans (the grid height).


valueCol: number;

Ref-relative column offset of the first column-group’s selected-item cells.