handsontable / hyperformula

HyperFormula is an open-source headless spreadsheet for business web apps. It comes with over 400 formulas, CRUD operations, undo-redo, clipboard support, and sorting.
https://hyperformula.handsontable.com/
Other
1.97k stars 108 forks source link

Add support for INDIRECT #1260

Open jfstephe opened 1 year ago

jfstephe commented 1 year ago

Description

INDIRECT: Return a reference given a string representation of a reference

Specifically I need this in order to be able to have references to relatively positioned cells without using the current cell reference e.g.

=OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,-1)

In order to do this, I will also need this issue resolving.

Open Formula

adrianszymanski89 commented 1 year ago

Hi @jfstephe

Thank you for your input.

@sequba

Do we have any timeline for this issue? https://github.com/handsontable/hyperformula/issues/1221

sequba commented 1 year ago

@jfstephe, ADDRESS function will most likely be included in the upcoming release of HyperFormula.

It seems to me that it is impossible to implement INDIRECT unless we change the way HyperFormula builds the dependency graph. Currently, HyperFormula collects dependencies during the parsing phase before evaluating any expression. The dependency graph is a core data representation of the engine. We do not plan to rewrite it in the near future.

Related discussion: https://github.com/handsontable/hyperformula/discussions/870

Why do you avoid using the current cell reference in your formula? Perhaps your problem has another solution which doesn't require INDIRECT?

171h commented 1 year ago

This is indeed a very important feature, and it can avoid complex custom operations.

AMBudnik commented 6 months ago

Ref: https://github.com/handsontable/hyperformula/discussions/1388