fast-formula-parser
fast-formula-parser copied to clipboard
Dependency parsing of index formulas in incorrect
When parsing an index formula like the following:
INDEX('Sheet1'!A1:AV90,'Sheet2'!C28,'Sheet2'!G2)
The result of new FormulaParser.DepParser().parse() is:
[{ from: { row: 1, col: 1 } }, sheet: "Sheet 1", to: { row: 90, col: 48 } ]
This would suggest there are thousands of dependencies, but really is are only 1 when the index is resolved, the row & column values given by arguments 2 & 3 are used to get the cell in question.
Maybe I am thinking about this wrong but this is how I see it, any thoughts are welcome