Skip to content
Spreadsheet Engine

formulaForDisplay

function formulaForDisplay(formula): string;

A formula as it should be shown to a user: the stored text without the storage prefixes on its function calls and name references, as a formula bar shows it. The rest of the text is unchanged.

The prefixes are part of what a stored formula means (_xleta.SUM is the function, an unprefixed SUM a name), so the result is for display only, not for storage or re-entry: two formulas that mean different things can display alike.

string

stored formula text, with or without a leading =

string

the formula with each storage prefix removed