Custom formula evaluation
Formula parser and calculation is plug n play
Formula parser
Custom functions
1. Create your named function
import type FormulaParser from "@rowsncolumns/fast-formula-parser";
import type { FunctionArgument } from "@rowsncolumns/calculator";
const SAY_WORLD = (parser: FormulaParser, arg: FunctionArgument) => {
if (arg.value === 'hello') {
return 'world'
}
}2. Create a function description
3. Pass the function and description to useSpreadsheetState
useSpreadsheetStateUsing your own formula evaluation
1. enqueueCalculation in useSpreadsheetState
2. Sending results to back-end
Web Worker support
Last updated