Skip to content
Sheetwrite

@sheetwrite/formulas

xlsxArrayFormulasfunction

Report a problem

On this page

Find the formulas of a joined batch whose result is an array, such as =SEQUENCE(3) or =A1:A3, which an XLSX file marks as dynamic arrays so Excel spills them. Each formula is read on its own, without a workbook, so a name that stands for a range does not count. The batch is split as in convertXlsxFormulas.

Declaration

function xlsxArrayFormulas(
joined: string,
ends: Uint32Array,
): Uint32Array

Parameters

joined: stringrequired

Every formula's text in editor spelling, one after another, without separators.

ends: Uint32Arrayrequired

Where each formula ends in joined, as a UTF-16 offset.

Returns

Uint32Array

The input index of each formula whose result is an array, ascending; throws when an end splits a surrogate pair or falls outside joined.

Referenced by

Public exports naming xlsxArrayFormulas