hyperformula-formula-inline-index-bug
https://github.com/handsontable/hyperformula/issues/1214
by thilgen
HTML
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div id="example"></div>
</body>
</html>
JavaScript
// https://github.com/handsontable/hyperformula/issues/1214
const hyperformulaInstance = HyperFormula.buildEmpty({
licenseKey: 'internal-use-in-handsontable',
});
const containerName = 'example'
var container = document.getElementById('example')
container.hot = new Handsontable(
container,
{
licenseKey: 'non-commercial-and-evaluation',
rowHeaders: false,
colHeaders: false,
height: 'auto',
fillHandle: false,
formulas: {
engine: hyperformulaInstance,
sheetName: containerName
},
data: [
['apple', null],
['pear', null],
['orange', null],
['=INDEX(A:A,2)','=FORMULATEXT(A4)']
]
}
)
function printDebugInfo() {
let debug = 'Handsontable:';
debug += ` v${Handsontable.version}`;
debug += ` (${Handsontable.buildDate})`;
debug += `\nHyperFormula: ${HyperFormula.version}`;
console.log(debug)
}
printDebugInfo()