hyperformula
hyperformula copied to clipboard
FORMULATEXT failing when the argument is not a CellReference type
Description
This works as expected in Google Sheets and Excel
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: [
[1, 2, '=SUM(A1:B1)', '=FORMULATEXT(C1)'],
[2, 3, '=SUM(A2:B2)', '=FORMULATEXT(index(C:C,2))'],
[3, 4, '=SUM(A3:B3)', '=FORMULATEXT(index(C:C,ROW()))'],
]
}
)
Platform | Results |
---|---|
HyperFormula | ![]() |
Google Sheets | ![]() |
MS Excel | ![]() |
Steps to reproduce
Your environment
- Handsontable: v12.3.2 (22/03/2023 14:43:31)
- HyperFormula: 2.3.1
- Browser Name & OS: Mac + Chrome
My guess is that our implementation of INDEX
returns a simple value from the referenced cell (without metadata etc). We should fix it or describe this limitation in https://hyperformula.handsontable.com/guide/list-of-differences.html