Try this procedure with German locale settings: SUB Formattest msgbox Format(123.546, "Currency") END SUB Will show 124 € instead of 123,55 €. Decimal separator and decimal places will be lost. Value will be rounded without decimal places. Bug appears in Version: 7.6.2.1 (X86_64) / LibreOffice Community Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333 CPU threads: 6; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb) Locale: de-DE (de_DE.UTF-8); UI: de-DE Calc: threaded and also in every older version installed here.
Hello Robert I wouldn't expect Basic to follow localizations, just use the dot as a decimal separator. ``` SUB Formattest msgbox Format(123.546 ,"#,##0.00 €") END SUB The output of the msgbox is then localized
(In reply to Werner Tietz from comment #1) > Hello Robert > > I wouldn't expect Basic to follow localizations, just use the dot as a > decimal separator. > > ``` > SUB Formattest > msgbox Format(123.546 ,"#,##0.00 €") > END SUB > > The output of the msgbox is then localized … but Format(123.546, "Currency") would run well in AOO (tested with AOO 4.1.8) and did run in the past with OpenOffice. So I thought it is intended to follow localization. Your code will run well, but doesn't follow the localization. Format(123.546, "Currency") will have a look at the localization (€-sign is set right) but will suppress decimal places.
Hallo Robert seems locale-related?! If I switch the UI to **en-US** the Example works as expected: ``` SUB Formattest msgbox Format(123.546, "Currency") '############## '# 123,55 € '############## END SUB ``` Version: 7.6.2.1 (AARCH64) / LibreOffice Community Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333 CPU threads: 4; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: de-DE (de_DE.UTF-8); UI: en-US Flatpak Calc: threaded ``` LO 7.4.7.2 shows the same behaviour with UI: en-US →→ 123,55 € # ok! with UI: de-DE →→ 123 € # not ok!