Inaccurate converting big numbers. #2562
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#2562
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?
I have an xlsx file including some big numbers below.

After converting this file using XLSX.sheet_to_json(), the part of result data is
Due to inaccurate number converting, I used to use 'w' property to make accurate result, but in "K50" cell case, 'w' property is not accurate also. (original value is 18800000000)
@monqkim the
v
values are coming from the file itself directly, which means that Excel likely stored the values with the remainder. Can you share a sample file?sample.xlsx
and here is my options.
Just so we're on the same page here, the
v
values are exactly what is stored in the Excel file. To see, go tohttps://sheetjs.com/cfb-editor/ then drag and drop the sample file, click "xl/worksheets/sheet1.xml" then click "View as Text" to see what is actually stored in the file:
It's clearly an artifact of the IEEE754 representation that Excel and JavaScript use, which is unfortunate but it is what it is.
Thanks for the answer, but why the 'w' value is different from the others? The 'w' of other cells reflects original formatted text accurately, but only
18800000000
cell's 'w' is different from the original value. Is it related to the digits after the floating point?Has anyone solved this problem