Geography Data Type #1733
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#1733
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
I'm trying to read a Geography Cell and I'm having trouble getting the value.
When I parse the excel to json, the cell is returned as
{t: "e", v: 15, w: "#VALUE!"}
.How can I get the country from these linked data type cells?
Most likely the file actually stores an error in the cell and Excel recomputes the value when you open the file. Can you share a sample file?
Sure, when you view the file in Excel it shows the country with a little map prefixed.
Countries.xlsx
So to be clear, this library reads whatever data is stored in the file. It doesn't attempt to perform Excel calculations (we actually have a paid component to handle calculating formula expressions, but that's not the thrust of the issue here).
For example, "Cambodia" is cell B2. The raw xml stored in the file (after prettifying with
xmllint --format
) for row 2 is:Cell B2 is very clearly stored with the
#VALUE!
error, andt="e"
notes that the cell is an error cell.Note: By default, XLSX uses a shared string table, and the "4" in cell A2 is the string at index 4 from the table (which happens to be "Activity One").
C2 is of course the literal number 2017
There may be a way to grab the name "Cambodia" from the value metadata, so we'll keep the issue open, but for now it's behaving as expected.