-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Wrong result when referencing a different sheet in OFFSET
function
#1477
Comments
Hi @bacek97, thank you for reporting this issue. The implementation of the If you want to use
|
Please add information about the impossibility of specifying a cell from another sheet. |
This will be done in #1488
I consider it a bug and I'll add it to our backlog as it's worth fixing. We'll use this issue (#1477) to track it. Thanks for reporting it, @bacek97. |
OFFSET
function
Here's a unit test that demonstrates the issue: it('function OFFSET can reference a different sheet', () => {
const engine = HyperFormula.buildFromSheets({
Sheet1: [['sheet1']],
Sheet2: [['sheet2', '=OFFSET(Sheet1!A1, 0, 0)']],
})
// Error: expect(received).toEqual(expected)
// Expected: "sheet1"
// Received: "sheet2"
expect(engine.getCellValue(adr('B1', engine.getSheetId('Sheet2')))).toEqual('sheet1')
}) |
Description
Passing a range as the first argument to an OFFSET formula results in an error
For example:
={OFFSET(A1:B1, 0, 0)}
={OFFSET(myRangeOne, 0, 0)}
Added:
OFSSET formula cannot return range of another sheet
Video or screenshots
No response
Demo
https://stackblitz.com/edit/stackblitz-starters-xv2m7kwi?file=index.js
HyperFormula version
2.7.1
Your framework
No response
Your environment
node v18.20.3, v23.1.0
The text was updated successfully, but these errors were encountered: