handsontable / handsontable/hyperformula

INDEX return CYCLE error when ranges overlap

Open
#655 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

To Be Discussed Verified
Dominant language
TypeScript
Stars
2.8k
Forks
171
Avg merge
1d 22h
Merged PRs (30d)
7

Description

Description

I'm trying to refer to columns by index within the current row. Usually in Excel, I would use INDIRECT(ADDRESS(ROW(); column)) to do this. I tried to use INDEX(A1:ZZ99; ROW(); column) but this does not work as intended.

Use some data e.g.:

["Abc", 1234, "=INDEX(A1:C6; ROW(); 2)"]
Steps to reproduce

Try to use any column number (1, 2, 4) and the value for the formula always will be [object Object].

I just tried this in https://codesandbox.io/s/github/handsontable/hyperformula-demos/tree/0.5.x/basic-usage?from-embed=&file=/src/data.js

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the formula from the linked CodeSandbox, using the example in src/data.js and INDEX(A1:C6; ROW(); 2). Start by tracing how INDEX evaluates a row-relative range and compare the returned value with the reported [object Object] result. Done means the reproduced formula returns the expected cell value without a cycle error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.