Convert joined formula sources, separated by cumulative UTF-16 ends (JavaScript string lengths).
Return only the changed formulas, and write their input indices to the front of
changed_indices, which holds at least one slot per source. Unchanged inputs keep their
JavaScript strings. An empty batch has empty text and ends. An end inside a surrogate pair or
outside the text fails.
Declaration
function convertXlsxFormulas( joined: string, ends: Uint32Array, exporting: boolean, changed_indices: Uint32Array,): string[]Parameters
joined: stringrequiredEvery formula's text, one after another, without separators.
ends: Uint32ArrayrequiredWhere each formula ends in joined, as a UTF-16 offset.
exporting: booleanrequiredtrue to write XLSX spelling (with _xlfn. and _xlpm. prefixes), false to read it.
changed_indices: Uint32ArrayrequiredReceives each changed formula's input index, from the start; needs a slot per formula.
Returns
string[]The text of each changed formula, in input order; throws when an end splits a surrogate pair or falls outside joined.
Referenced by
Public exports naming convertXlsxFormulas
formulasFromXlsx@sheetwrite/formulasformulasToXlsx@sheetwrite/formulasInitOutput@sheetwrite/formulasformulasFromXlsx@sheetwrite/wasmformulasToXlsx@sheetwrite/wasmInitOutput@sheetwrite/wasm