Spreadsheet formatting issue
I need to format a number for *.ods spreadsheet export, for example an area of a slab 24.16123648 -> 24,16
(goal is to get two decimals and a comma as a delimiter)
Here is my settings number(round({{value}}, 0.01), ",")
The issue is that in the *.ods output there is an extra apostrophe character before the number:
Tagged:
Comments
I can't replicate this. What version are you on?
bonsai_py311-0.8.1-alpha250103-linux-x64
Just in case, I am enclosing the *.ifc test file and corresponding
CSV Settings
(I have changed the file extension to *.txt, because attaching of *.json is forbidden).I don't have the single quote either, but I noticed some odd behavior with comma separator in LibreOffice (not using it that much)
by the way, if you need to remove the preceding single quote you can use Data > Text to Columns like
The USA
locale
in your screenshot @steverugi gave me an idea to try to change the Libre Office locale settings.English (USA) locale
the very same *.ods file doesn't show the extra single quote characterCzech locale
(see the screenshot) (and I also tried a German locale) the single quote is shownHowever I am not sure it is 100% Libre Office's fault because when I don't use the CSV formatting in Bonsai, the single quote does not appear even with the czech locale.
Hmm, so even with the USA locale, despite the single quote is not shown, the number is not treated as a number in my Libre Office, so I cannot do operations like
SUM
...@viktor,
a workaround would be export as "*.csv", edit with a text editor (like notepad), changing separator to ";" and decimal separator to ",". Later, import with libreoffice calc
OK
I set my LibreOffice Calc with Czech
Locale Setting
I select the cells having a single quote before the number
I go to Data > Text to Columns and set
Tab
as below:to make them a number I can operate with (see sum at the bottom)
Thanks for the workarounds @avico @steverugi I can also omit the Bonsai's formatting step and set the desired decimal places afterward in LO's
Format Cells
Do you think I should file a bug report?
I was actually about to suggest it..
Yes, I think it's worth mentioning it
Ok, reported . And I found a funny workaround:
there is no issue when I use
number(12345, ",")
instead of thenumber({{value}}, ",")