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
Description
ADDRESS(2,3,1,FALSE(),)returns!R2C3instead ofR2C3.When the
sheetNameargument 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:does not exclude empty strings. Fix: add
&& sheetName !== ''.Reproduction steps
Excel reference
=ADDRESS(2,3,1,FALSE(),)→R2C3(Microsoft 365 desktop)HyperFormula version
3.2.0
Your framework
No response
Your environment
Node.js