- Notifications
You must be signed in to change notification settings - Fork 140
Closed
Labels
Description
Followed your readme to come up with the below code which throws a Function name METRIC not recognized.. What am I doing wrong? Here's the codesandbox. Might be the same bug as this.
import HyperFormula, { FunctionPlugin } from "hyperformula"; class MetricPlugin extends FunctionPlugin { static implementedFunctions = { METRIC: { method: "metric" } }; metric(ast, state) { return this.runFunction(ast, state, this.metadata('METRIC'), () => 63); } } export default function App() { HyperFormula.registerFunctionPlugin(MetricPlugin); const hfInstance = HyperFormula.buildFromArray([["=METRIC()"]], { licenseKey: "gpl-v3" }); const value = hfInstance.getCellValue({ sheet: 0, col: 0, row: 0 }); console.log(value); return null; }