Problem with merge field with number format

Hi,


I have the following problem: in one of our templates there is a merge field which is formatted as follows

# 0.00

this, as far as I know, should format the number to keep only two decimals, but instead of this, I get that the number is divided by 100 instead.

Is this normal? Did I make some mistake?
Hi Matteo,

Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.4.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.4.0 and let us know how it goes on your side. I hope, this will help.

If the problem still remains, please share following detail for investigation purposes.

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Java version
  • Provide information about your specific culture, such as the name of the culture, language and country/region.
  • Please supply us with the input document that is causing the issue
  • Please supply us with the output document showing the undesired behaviour

tahir.manzoor:
Hi Matteo,

Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.4.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.4.0 and let us know how it goes on your side. I hope, this will help.

If the problem still remains, please share following detail for investigation purposes.

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • Java version
  • Provide information about your specific culture, such as the name of the culture, language and country/region.
  • Please supply us with the input document that is causing the issue
  • Please supply us with the output document showing the undesired behaviour


I found out the problem using an old 10.x version, but it is still there even now that I have update to latest version.

I resorted formatting the number directly on the database, even if I do not like this solution very much.

Here is the details you requested:

OS: Windows 8 64 bit
Java: 1.7u21 (32 bit)
Language: Italian
Input document: attached, see page 6 of 8 of verbale_it.doc
Output with error: attached, see page 9 of 12 of Report_mod_98_20.doc
Hi Matteo,

Thanks for sharing the details.

Please note that Aspose.Words tries to mimic the same behaviour as MS Word do. If you do the mail merge with same number formatting by using MS Word, you will get the same output. The output 1000.00 for value '1000' is correct with number formatting "\# 0.00" for en-US. Aspose.Words and MS Word shows the same output for "\# 0.00".

In your case, for "it-IT" locale the number format should be "\# 0,00" instead of "\# 0.00". Please correct the number formatting according to Italian culture in your document. Please see the attached image for detail.

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.