workbook.Names Ref returns **MISSING** sheet reference when named range refers to multiple cells #680
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#680
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
workbook.Names returns Ref: "**MISSING**!" when the named range refers to a multi-cell range. Single cell and dynamic named ranges work as expected (NamedRanges.xlsb is attached in the zip).
returns
{"0":{"Name":"DynamicNamedRange","Comment":"","Ref":"OFFSET(Sheet1!$A$5,0,0,2,1)"},"1":{"Name":"MultiCellNamedRange","Comment":"","Ref":"**MISSING**!A2:A4"},"2":{"Name":"SingleCellNamedRange","Comment":"","Ref":"Sheet1!$A$1"}}
NamedRanges.zip
This works for xlsx and xlsm but not for xlsb and xls
Thanks for the report!
XLSX/M store formulae and links as strings (life's easy :)
XLS/XLSB store formulae and links in this binary monstrosity which is effectively a memory dump of an AST for a grammar that Microsoft has conveniently omitted, so we had to backsolve many of the details. Any sort of MISSING string represents an area of the grammar that hasn't been addressed. If you're interested in exploring further, the bulk of the logic is in the fxls bit -- the comments point to the relevant parts of [MS-XLS] and [MS-XLSB].
XLSB and XLS store links in one of three ways:
application/vnd.ms-excel.externalLink
)SupBook
andExternSheet
, XLSB has records likeBrtSupBookSrc
andBrtSupSelf
)It's strange that the attached file has no external references yet still fell back to the supporting link structure. Our defined name test only really tests the first case, so we'll need to go back and look at the other two cases.