[Bug]: ADDRESS returns "!R2C3" when sheetName is empty (should return "R2C3")
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- backend
Research direction
Start in src/interpreter/plugin/AddressPlugin.ts at line 70 and run the provided ADDRESS reproduction to confirm the current result. Exclude an empty sheetName from the separator logic, then rerun the reproduction and verify that it returns "R2C3" rather than "!R2C3".
Written by the indexing model from the issue text.
Description
Description
ADDRESS(2,3,1,FALSE(),) returns !R2C3 instead of R2C3.
When the sheetName argument is an empty string (either from an empty cell reference or trailing comma), HyperFormula still prepends the ! separator. Excel ignores empty sheetName and returns the address without prefix.
Root cause
In src/interpreter/plugin/AddressPlugin.ts:70, the condition:
if (sheetName !== undefined && sheetName !== null)
does not exclude empty strings. Fix: add && sheetName !== ''.
Reproduction steps
const hf = HyperFormula.buildFromArray([
['=ADDRESS(2,3,1,FALSE(),)'], // empty sheetName — should be "R2C3", bug: "!R2C3"
], { licenseKey: 'gpl-v3' })
hf.getCellValue({ sheet: 0, row: 0, col: 0 })
// Actual: "!R2C3"
// Expected: "R2C3" (Excel behavior, Microsoft 365 desktop)
Excel reference
=ADDRESS(2,3,1,FALSE(),) → R2C3 (Microsoft 365 desktop)
HyperFormula version
3.2.0
Your framework
No response
Your environment
Node.js
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 171
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from handsontable/hyperformula
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
handsontable/hyperformula#1745 ·
-
Bug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
handsontable/hyperformula#1746 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
handsontable/hyperformula#1744 ·
-
ANNOUNCEMENT
Difficulty 1/5 Under an hour Newbie friendliness 20/100
handsontable/hyperformula#1685 · 2 reactions ·
-
[Bug]: Parser fails on formulas with _xlfn.xxx prefix added by Excel for backwards compatibility OpenBug Impact: High PublicRoadmap
handsontable/hyperformula#1655 · 2 comments · 1 reaction · 1 assignee ·
All issues in handsontable/hyperformula
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100