Skip to content
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

Number rounding issue #1328

Closed
pramonow opened this issue Aug 23, 2022 · 3 comments
Closed

Number rounding issue #1328

pramonow opened this issue Aug 23, 2022 · 3 comments
Labels
bug Something isn't working
Projects

Comments

@pramonow
Copy link

pramonow commented Aug 23, 2022

Description
Float number is always rounded down

Steps to reproduce the issue:
Uploading excel with this value

Screen Shot 2022-08-23 at 18 03 26

notes the circled value, raw value is 463.614634146341
and the excel value is 464 (because of the rounding formatting)

Tried on some excel version and it's getting different behaviour (it's giving expected value in excel 2007 but not on 2020)

Describe the results you received:
Result from excelize GetRows method is returning 463 (rounded down)

Describe the results you expected:
Expected it to return 464

Excelize version or commit ID:

github.com/xuri/excelize/v2 v2.6.0

Environment details (OS, Microsoft Excel™ version, physical, etc.):
Mac OS Monterey, Excel version 2020

@xuri
Copy link
Member

xuri commented Aug 23, 2022

Thanks for your feedback. Could you provides the workbook file as an attachment without confidential info?

@xuri xuri added the needs more info This issue can't reproduce, need more info label Aug 23, 2022
@pramonow
Copy link
Author

thanks for the reply
below i have attached the file
testing sampling v2 (6) (1).xlsx

also the result when i printed out the rows are:
[ 310] [ 1.85663157894737] [ 463] [ 1.92857142857143] [ 518] [ 491] [ 530]
where i expected it to actually match the excel value (i.e: first one should be 311)

@xuri xuri added bug Something isn't working in progress Working in progress and removed needs more info This issue can't reproduce, need more info labels Aug 23, 2022
@xuri xuri closed this as completed in cb8bca0 Aug 23, 2022
@xuri
Copy link
Member

xuri commented Aug 23, 2022

Thanks for your issue. I have fixed it, please upgrade to the master branch code, and this patch will be released in the next version.

@xuri xuri removed the in progress Working in progress label Aug 23, 2022
rodoard pushed a commit to sheetrocks/excelize that referenced this issue Aug 26, 2022
- Add new smooth field in chart format parameter, support specify if smooth line chart
- Fix decimal number format round issue with build-in number format
@xuri xuri added this to Bugfix in v2.7.0 Aug 30, 2022
xuri added a commit to carbin-gun/excelize that referenced this issue Oct 9, 2022
- Add new smooth field in chart format parameter, support specify if smooth line chart
- Fix decimal number format round issue with build-in number format
xuri added a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
- Add new smooth field in chart format parameter, support specify if smooth line chart
- Fix decimal number format round issue with build-in number format
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
- Add new smooth field in chart format parameter, support specify if smooth line chart
- Fix decimal number format round issue with build-in number format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v2.7.0
Bugfix
Development

No branches or pull requests

2 participants