Handsontable example
HTML
<script src="https://cdn.jsdelivr.net/npm/handsontable@12.2/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@12.2/dist/handsontable.full.min.css" />
<script src="https://handsontable.com/docs/scripts/fixer.js"></script>
<div id="example-named-expressions1"></div>
Babel + JSX
import Handsontable from 'handsontable';
import HyperFormula from 'hyperformula';
import 'handsontable/dist/handsontable.full.min.css';
const data = [
['Travel ID', 'Destination', 'Base price', 'Price with extra cost'],
['154', 'Rome', 400, '=ROUND(A_9IOP+C2,0)'],
];
const container = document.querySelector('#example-named-expressions1');
const hotNamedExpressions = new Handsontable(container, {
data: data,
colHeaders: true,
rowHeaders: true,
height: 'auto',
formulas: {
engine: HyperFormula,
namedExpressions: [
{
name: 'A_9IOP',
expression: 100
}
]
},
licenseKey: 'non-commercial-and-evaluation'
});