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

Not culture ignorant #3

Open
BoGrevyDynatest opened this issue Mar 17, 2017 · 1 comment
Open

Not culture ignorant #3

BoGrevyDynatest opened this issue Mar 17, 2017 · 1 comment

Comments

@BoGrevyDynatest
Copy link

If using a culture with a decimal separator different from dot - e.g. Danish where the decimal separator is comma, the output file becomes corrupt and with missing decimal part for doubles.

excelerrormessage
result_dk_settings
result_us_settings
result_us_settings_dk_open

@BoGrevyDynatest
Copy link
Author

Simple work around: Change the culture to US English just before writing the file, and change it back after writing the file.

        var tmp = Thread.CurrentThread.CurrentCulture;
        Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
        Spreadsheet.Create(fileNameSections, sheetsSections);
        Spreadsheet.Create(fileNameDistresses, sheetsDistresses);
        Thread.CurrentThread.CurrentCulture = tmp;

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

No branches or pull requests

1 participant