-
Notifications
You must be signed in to change notification settings - Fork 57
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
Rounding #16
Comments
First, it looks like your numbers are floats since they have a decimal in them, could you send a screenshot of the whole window? Maybe an excel file example? It's hard to get specific enough about what's going on without things like screenshots and files. Second, what's the actual values? Based on what you provided, it looks like excel is flooring the values, where ruby is rounding half-up. I'd have to look up the spec to see what it says, maybe it differs in different versions, or it's a part of the format? Again, actual numbers and format screenshots or files would be good here. For example, if the format or data is part of a function, this could be an expression of the table-makers dilemma. Probably solvable, but not without more info. Although better float/rounding support is the best strategy, it's worth noting this is the second issue opened about custom formatting and integer casting (see #12). As noted in #12, casting is done statically. It would be relatively easy to have a configurable casting method, and for your case you could then translate all number styles (including integer) to a plain number. However, I don't want to just provide people a way to work around a real bug, so we should investigate getting this working properly first. |
Closing due to inactivity |
I have a spreadsheet that contains float values formatted as integers. When I read those values though simple_xlsx_reader it returns integers instead of floats, but that's not the real problem, the thing is that it rounds differently.
Any advice? Maybe a way of force simple_xlsx_reader to always read numbers as float.
simple_xlsx_reader output:
139702
35519
3488
REF!
113544
120874
92441
10262
11017
13339
4923
The text was updated successfully, but these errors were encountered: