-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small float does not get parsed correctly #1031
Comments
Thanks for your feedback, I'm sorry that this library doesn't support parse custom number format and some scientific notation numeric with the default number format currently, it will return the raw value of the cell. Please try to convert it by yourself with cell type into your need format, for example: num, err := strconv.ParseFloat("4.0000000000000003E-5", 64)
if err != nil {
fmt.Println(err)
}
strconv.FormatFloat(num, 'f', -1, 64) This issue also affects the time parse precision, also ref #1030, I'll fix it later. |
Thanks for all your work on this! 😄 |
- new formula function: YEARFRAC, ref qax-os#65 - update the codecov version - remove unused variable
Description
Parsing of a float ends up as a string. Number Format has no effect on it.
Steps to reproduce the issue:
.xlsx
file with 1 sheet with0.00004
in cell A1 (General
cell type).Describe the results you received:
4.0000000000000003E-5
Describe the results you expected:
0.00004
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
macOS Big Sur 11.5.2
Microsoft Excel for Mac v16.53
The text was updated successfully, but these errors were encountered: