Change decimal point to ,

In my language we use , instead of . for decimal seperation. How can I change double format to display , when I export it in word? The data is in tabele amd I neet to export the whole table into Word.

@tomaz
Change double to string and then use .Replace function which will change (.) to (,)

Is there any option to do this without changing to string?

HI @tomaz

  1. Approach
YourInput.Replace (".", ",")
  1. Another approach
Convert.ToDecimal (YourInput)
  1. Another approach
YourInput.ToString ("N2", new CultureInfo ("fr-FR"))

Regards
Gokul

Hi,

Another approach:

image

varDouble.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("ES-es"))

It might be better to change “ES-es” to your country’s locale string.

Regards,

1 Like

@tomaz
There is two method only
one is .Replace function and second is regex.
without these i don’t think so their is another solution