Floating-point number reading incorrect #2849
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2849
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?
For example, 22.225 is incorrectly read 22.224999999
Can you share an example file?
In general, the
v
values are the raw values coming from the workbook. If you want the formatted text, thew
property holds the text values. Some of the API functions take araw
option to control whether raw or formatted values are used.To show the effect, see the attached file. The value 22.225 was added to the sheet in 3 ways: manually entered, using the formula
=22.225
and using the formula=22225/1000
. In all three cases, under the hood Excel stores22.225000000000001
.Please share an example and we can reopen the issue and take a closer look. It is almost certainly the case that the actual file has a value like
22.224999999
and the number formatter library should be generating the correct text. (the formatted text and raw values are separate fields in the cell object)