Skip to content

PivotLayout

type PivotLayout = object;

Computed pivot table layout: aggregated data grid, row/column headers, and output dimensions.

cellCounts: number[][];

Per-cell record counts: cellCounts[rowIndex][colIndex] = number of filtered cache records contributing to that intersection. Same [rows × cols] shape as dataGrid minus the data-field dimension; [] for an empty cache. Used by GETPIVOTDATA’s empty-bucket coercion.


colGrandTotals: CellValue[][];

Per-column totals (aggregated across all rows): colGrandTotals[colIndex][dataFieldIndex]


colHeaders: CellValue[][];

Unique values for each column field, in display order


optional colSubtotals?: ColumnSubtotal[];

Column subtotals, present with 2+ column fields. Drives computed subtotal columns and GETPIVOTDATA partial column criteria lookup.


dataGrid: CellValue[][][];

Aggregated data: dataGrid[rowIndex][colIndex][dataFieldIndex] For a single data field, dataFieldIndex dimension has length 1.


grandTotals: CellValue[];

Grand total for each data field


optional outputColCount?: number;

Data columns + subtotal columns, excluding the grand total column. Used by getCellWrites.


optional outputRowCount?: number;

Data rows + subtotal rows (grand total excluded). Used by getCellWrites/getOutputBounds.


rowGrandTotals: CellValue[][];

Per-row totals (aggregated across all columns): rowGrandTotals[rowIndex][dataFieldIndex]


rowHeaders: CellValue[][];

Unique values for each row field, in display order


optional subtotalRows?: SubtotalRow[];

Subtotal rows, present when field subtotals are configured