-
Notifications
You must be signed in to change notification settings - Fork 503
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
Read the numeric field #139
Comments
I found that topic: http://thr3ads.net/rails/2013/10/2695463-Fwd-Read-a-Number-column-with-leading-zeros-using-Roo-gem but it given't happy to me. I don't know how much digits in the string I have. I need just copy that value as string |
There is a way to get the value as a string. I'm one of the new Roo maintainers and I'll be merging in a way to get untyped values from a field in a few days. I'll post here again when it has been merged. |
ok, thanks! @emerson-h this will be very helpful. I waiting for your response |
+1 and thanks for picking up maintenance @emerson-h! Here's my current workaround using cell = s.cell(row,col)
cell = s.excelx_value(row,col) if s.excelx_type(row,col) == [:numeric_or_formula, "General"] |
I've been looking into this issue for |
When I started working on the tests, I ran into some major regressions when dealing with spreadsheets that used commas instead of periods before decimal places, i.e. Here are my original modifications:
That solved the initial issue, finding zero-padded numbers, but several of the worksheets in the test suite had commas instead of periods:
I don't know how to accurately determine whether a number is using commas instead of periods for decimals. Is Creating a solution similar to what you use for excel would ideal, but it would require making major changes to how Does anyone else have any ideas on how to solve this issue? |
Coma or dot in number it's a locale specific thing. |
It is for locales. Unfortunately, the xml files that I prefer having a |
+1 |
@nicolasgarnil I'm not sure if the fix by @emerson-h was merged, but the workaround by @andymeneely (shown below) worked for me.
|
I believe this issue is fixed by #240, but we need to add some specs or tests to confirm it works properly. |
So, I got around to testing this today. It's still broken, but I think I know where to look now. |
Fixes roo-rb#139 for Excelx documents.
I have trouble with roo and don't know how to solve it. I need help
I have a table with values like (in OpenOffice)
1st column is numeric. When I try to get the value from
(2,1)
I get this value without '0' value (600000383.0
instead of0600000383
). Is there any way to get the numeric value as string without any formatting with roo?The text was updated successfully, but these errors were encountered: