Formula data types in JavaScript
masterFormulas and functions in fast-formula-parser can only return the following data types:
- Number:
1234(Dates are also represented as numbers) - String:
'some string' - Boolean:
true,false - Array:
[[1, 2, true, 'str']] - Range Reference (1-based index):
{ sheet: String, from: { row: Number, col: Number }, to: { row: Number, col: Number } } - Cell Reference (1-based index):
{ sheet: String, row: Number, col: Number } - Union: A collection of references (e.g.,
A1:C3, E1:G6) - FormulaError: An error object (e.g.,
#DIV/0!)
Supported FormulaError constants:
FormulaError.DIV0:#DIV/0!FormulaError.NA:#N/AFormulaError.NAME:#NAME?FormulaError.NULL:#NULL!FormulaError.NUM:#NUM!FormulaError.REF:#REF!FormulaError.VALUE:#VALUE!