JavaScript
const data = [
['a', 'aa', '=LEN(A1)', '', '', '', '', ''],
['aaa', 'aaaa', '=LEN(A1:B1)', '', '', '', '', ''],
['aaaaa', 'aaaaaa', '=LEN(A1:B2)', '', '', '', '', ''],
['=SUM(LEN(A1:B2))', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', ''],
];
const hyperformulaInstance = HyperFormula.buildEmpty();
const container = document.getElementById('example');
new Handsontable(container, {
data: data,
colHeaders: true,
rowHeaders: true,
height: 'auto',
beforeChange(changes, source) {
console.log(changes, source);
},
formulas: {
engine: hyperformulaInstance,
sheetName: 'Sheet1'
}
});