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

Very large numbers get imported as ​4.35e+08 #49

Closed
farling42 opened this issue Mar 17, 2019 · 4 comments
Closed

Very large numbers get imported as ​4.35e+08 #49

farling42 opened this issue Mar 17, 2019 · 4 comments

Comments

@farling42
Copy link
Owner

See http://forums.wolflair.com/showpost.php?p=276758&postcount=477

"I had one cell formatted like this: 999.999.999,99 -> it is a price column and excel showed the numbers in a convinient way. Very high prices were also imported as ​4.35e+08​ for example."

@farling42 farling42 added the bug label Mar 17, 2019
@farling42
Copy link
Owner Author

A simple test using UK command and decimal point showed 999999999.99 appearing in Realm Works.

The user's native language is German, so uses "," as the decimal point. This import as "99999999999."

@farling42
Copy link
Owner Author

The XML format for numbers does not allow any characters to separate multiples (e.g. thousands), and expects "." to be used as the decimal point.

@farling42
Copy link
Owner Author

farling42 commented Jun 27, 2021

When converting to a value for a Numeric field, use the QLocale::system().toDouble(str, &ok) to perform the correct conversion, rather than just QString::toDouble()

If QLocale() fails, then try QLocale::c().toDouble()

If that also fails, then report a problem.

@farling42 farling42 self-assigned this Jun 27, 2023
@farling42
Copy link
Owner Author

CSV2RW is in maintenance mode now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant