Xojo 2021 R1; Win 10; Excel 2016; German;

Hello,

just trying to find an error with ExcelWorkbook/sheet.

When I pass values to an open worksheet like
WS.Range("F" + str(6 + i)).Value = str(SumValue).replace(".", ",")
a value like 17765.56 gets “17765,56” using the German separator but
783873.82 get “783873,80”.
I can not imagine why with some bigger numbers the second floating digit seems to be rounded.
At Xojo side the number is correctly shown in debugger, all formattings at Excel side are the same (number with 2 floating point digits).

I do not use MBS/LibXL at the moment as I need formatting and get values from formulas.

Any idea how this can happen?

Thanks in advance,
Hanno

have you tried a excel with cell type number
and assign the number direct and not as string?

1 Like

Hello Markus,

I did try this and tried this again and now it works and now I am the idiot.
With some other values that did not work either for floating point numbers so I decided to do this.
The field cell was as I guess set to standard; and that did not work… :roll_eyes:

Ok, always a good idea to use Xojo and the Xojo forum!

Thanks a lot for Your help!!!

3 Likes
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.