PivotLayout
type PivotLayout = object;Computed pivot table layout: aggregated data grid, row/column headers, and output dimensions.
Properties
Section titled “Properties”cellCounts
Section titled “cellCounts”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
Section titled “colGrandTotals”colGrandTotals: CellValue[][];Per-column totals (aggregated across all rows): colGrandTotals[colIndex][dataFieldIndex]
colHeaders
Section titled “colHeaders”colHeaders: CellValue[][];Unique values for each column field, in display order
colSubtotals?
Section titled “colSubtotals?”optional colSubtotals?: ColumnSubtotal[];Column subtotals, present with 2+ column fields. Drives computed subtotal columns and GETPIVOTDATA partial column criteria lookup.
dataGrid
Section titled “dataGrid”dataGrid: CellValue[][][];Aggregated data: dataGrid[rowIndex][colIndex][dataFieldIndex] For a single data field, dataFieldIndex dimension has length 1.
grandTotals
Section titled “grandTotals”grandTotals: CellValue[];Grand total for each data field
outputColCount?
Section titled “outputColCount?”optional outputColCount?: number;Data columns + subtotal columns, excluding the grand total column. Used by getCellWrites.
outputRowCount?
Section titled “outputRowCount?”optional outputRowCount?: number;Data rows + subtotal rows (grand total excluded). Used by getCellWrites/getOutputBounds.
rowGrandTotals
Section titled “rowGrandTotals”rowGrandTotals: CellValue[][];Per-row totals (aggregated across all columns): rowGrandTotals[rowIndex][dataFieldIndex]
rowHeaders
Section titled “rowHeaders”rowHeaders: CellValue[][];Unique values for each row field, in display order
subtotalRows?
Section titled “subtotalRows?”optional subtotalRows?: SubtotalRow[];Subtotal rows, present when field subtotals are configured