PivotCache
Runtime representation of a pivot cache: wraps the JSF PivotCache definition and exposes
resolved records with shared-item indices replaced by actual values.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PivotCache(jsf): PivotCache;Parameters
Section titled “Parameters”PivotCache
Returns
Section titled “Returns”PivotCache
Properties
Section titled “Properties”readonly jsf: PivotCache;Accessors
Section titled “Accessors”compiledCalcFields
Section titled “compiledCalcFields”Get Signature
Section titled “Get Signature”get compiledCalcFields(): ReadonlyMap<number, CompiledCalcField>;Compiled calc-field formulas, keyed by cache field index. Populated for fields with a
formula that compiles successfully; missing entries mean no formula or an unsupported one
(treated as if the field had no formula).
Layout consumes these under Excel’s aggregate-then-apply model: each cell sums the formula’s
referenced source fields over the contributing records (inlining any referenced calc field
over those sums), then calls evaluate once with those scalars substituted (see
CalcFieldAggregator).
Returns
Section titled “Returns”ReadonlyMap<number, CompiledCalcField>
fieldNames
Section titled “fieldNames”Get Signature
Section titled “Get Signature”get fieldNames(): string[];Returns
Section titled “Returns”string[]
resolvedRecords
Section titled “resolvedRecords”Get Signature
Section titled “Get Signature”get resolvedRecords(): readonly readonly CellValue[][];The records with every calc-field column resolved. Indexing resolvedRecords[r][fieldIndex]
returns a real value for any field, so this getter first materializes any calc-field column not
yet filled (a no-op once they all are). Use it when you need an arbitrary field’s value and
cannot assume it has been resolved. When resolution has already happened, or only specific calc
fields are needed, read records instead (resolving just those via
ensureCalcFieldsResolved) to avoid materializing columns no one reads.
Returns
Section titled “Returns”readonly readonly CellValue[][]
sourceRef
Section titled “sourceRef”Get Signature
Section titled “Get Signature”get sourceRef(): string | undefined;Returns
Section titled “Returns”string | undefined
sourceSheet
Section titled “sourceSheet”Get Signature
Section titled “Get Signature”get sourceSheet(): string | undefined;Returns
Section titled “Returns”string | undefined
Methods
Section titled “Methods”adjustSourceRangeForMove()
Section titled “adjustSourceRangeForMove()”adjustSourceRangeForMove( sheetName, dimension, from, to, count): void;Adjust the source data range after a row/column reorder on a sheet (a move of the block
[from, from + count) landing with its first row/column at to). Unlike the
delete-then-insert model of adjustSourceRange, a source range fully inside the
moved block follows it to the new position: the move keeps the source data intact, so
clearing the ref (the genuine-deletion outcome) would silently disable refresh. Any other
range gets the delete-then-insert adjustment, which matches Excel for ranges the move
partially overlaps (see excel-test/pivot-move-source/verify.js).
Parameters
Section titled “Parameters”sheetName
Section titled “sheetName”string
dimension
Section titled “dimension”number
number
number
Returns
Section titled “Returns”void