European style decimal point

Does Aspose Words for Java support mail merging numerical values given in European style decimal point (i.e. a comma)?

Hi
Thanks for your request. Sure, Aspose.Words supports this. You should just specify the correct culture before executing mail merge, so Aspose.Words considers coma as decimal separator.

// Set culture that should be used.
CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
// Here you can open template and execute mail merge.
// Restore the original culture
Thread.CurrentThread.CurrentCulture = currentCulture;

Hope this helps.
Best regards,

Hi

I am not able to get your suggestion working…

Errors:

CultureInfo cannot be resolved to a type
CultureInfo cannot be resolved to a variable
CurrentCulture cannot be resolved or is not a field

My requirement is to set the locale (cultureinfo) per thread not for the entire JVM since every request can have different locale.

Also in the above mentioned example, is it enough just to use InvariantCulture or do we use specific ones (like en-en, de, fr etc.,)

Hi
Thanks for your request. I am sorry, the example was for .NET. In Java you should use code like the following to set locale:

Locale L = new Locale("en", "nz");
Locale.setDefault(L);

Hope this helps.
Best regards,

Thanks alexey!

\# $#,###.00 number format doesnt work in java version of aspose.words

I dont see the value after mail merge with that field format…

Please help…

Hi Ravikumar,

I answered your question here:
https://forum.aspose.com/t/55481

Best regards,