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

Culture Info setting #35

Open
isaacabraham opened this issue Jan 10, 2017 · 2 comments
Open

Culture Info setting #35

isaacabraham opened this issue Jan 10, 2017 · 2 comments

Comments

@isaacabraham
Copy link

Is there any way (or plans) to allow setting Globalization settings when reading sheets? If you use ForceString = true, it appears to return the data in the OS culture, rather than the current culture of the app domain that's been set. This causes problems downstream if you then do any parsing operations.

@magnushammar
Copy link

This one bit me today. My expectation from ForceString was that I would get the same exact string that I see in Excel. If I have the characters 12,34 in Excel I don't expect to get the string "12.34", its not the same sequence of characters. 😄

A very real problem is also that the behavior will change depending on the cell format. I am certain that this would have haunted me in the future if I hadn't noticed it today.

English USA OS with Swedish Regional Settings
Excel format: General
12(comma)34 --> "12(dot)34"
Excel format: Text
12(comma)34 --> "12(comma)34"

@waynebx
Copy link

waynebx commented Nov 14, 2018

I guess it has something to do with using the string operator to convert values to String. string operator will attempt to use InvariantCulture instead of the current culture if the input can be casted to IFormattable

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

4 participants