Help with CurrencyField data in DialogBox - LO Calc

Hi,

I’m building a LibreOffice Calc for myself.

I’m gathering data to fill my sheets in a DialogBox.

I have trouble writing my currencyfield’s data.

Right now, if I write “xx €” it fills the sheets with the correct data. But when I enter “xx,xx € (or xx.xx €)” it will shurten it to xx€ skipping the “.xx” part

Here is some of my code :

Dim ValMont as Variant
...
ValMont = oDialog.getControl("montant").Text
...
feuille0 = ThisComponent.sheets(0)
currCell = feuille0.GetCellByPosition(13,6)
currCell.Value = ValMont

Using the step by step method, I checked that my “ValMont” has the correct value (xx,xx€).
But as soon as this value is transmitted to currCell it becomes xx€.

Can someone help me ?

Thanks

I guess your locale is France with Decimalcomma?

try

currCell.FormulaLocal = ValMont

Thanks so much.
I’ve tried currCell.setString or currCell.Formula before but I did not try this assuming it will result the same.
I was wrong :smiley: