Open Maxxan opened 5 years ago
Your point makes sense. I couldn't reproduce it here right away though. Which platform and which locale setting did you use?
I looked into sprintf_l but that doesn't seem to exist on all platforms. Which function do you propose?
An easy way to reproduce it is to use setlocale when opening the excel file (start writing) and set it to a locale that uses a decimal comma like std::setlocale(LC_NUMERIC, "de_DE.UTF-8");
. I don't know what is the best way to solve it though. Same with fprintf_l, might not exist for all platforms.
I have exactly the same problem (france). I guess that a simple way to solve it is to compile the library by setting
Thank you brechtsanders for this nice library
If the application uses the static library and set the locale to use a comma instead of a dot for decimals, then the formatting in the xlsxio will produce corrupt xlsx-files since for example the width of the columns will be "19,5" instead of "19.5".
So formatting should use the a locale that gives a decimal dot. Either set the locale and restore the old one when done saving or use a format function that takes a locale as a parameter.