Strange Number Formatting Behavior After Upgrading 9.3.0

Hi,
We use Aspose.Words.NET in our project to generate Word report. The report is for German clients so the merge fields in word templates use euro format, not US format. The number format is “123.456.789,00”. We want to show percentage number in report and the format of merge field is { MERGEFIELD XXX # “#0.00’%’” } in Word template**.** At the begining, we use Aspose.Words.NET 9.0.0 and the result can be shown correctly using that format. But two weeks ago, we upgraged Aspose.Words.NET to 9.3.0, and then the result is shown incorrectly: for example: the original number is 0.015 and the correct one is 1,50 %, but we got 002% now. So we are confused. I noticed that 9.3.0 was said to include new feature:Allow format strings in any culture. So when using current version of Aspose.Words.NET, what is the correct percentage format to show percentage number, or what code is needed to show it correctly? Could anybody give me some advice?
Thanks.

Hi

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

Hi Alexey,
Thank you for your reply. This issue is very urgent now because our project will be released in next week. If it cannot be solved in these days, we have only to fallback to using 9.2.0 :frowning: So we will very appreciate it if you can help us solve that issue in these two days.
Thanks a lot

Hi

Thanks for your inquiry. We will try to fix the problem before the next hotfix that is coming soon. We will let you know once it is released.
Best regards,

Hi,
I have just fixed the issue. Now the formatting works exactly as in Microsoft Word. However, due to this fact please do the following to maintain the correct result (after you update to the next hotfix):

  1. Since you use German culture, change the number format from #0.00’%’ to #0,00’%’ because Aspose.Words now handles local culture format (as Microsoft Word does) and ‘,’ is the decimal numbers delimiter in German culture, not ‘.’.
  2. If you need to get 1,50% as the result, you should pass 1.5 as the value instead of 0.015. The reason is that Microsoft Word does not multiply percent values by 100 (unlike .NET) and therefore you should not expect this from Aspose.Words. This issue is also fixed in the forthcoming release.

Thanks.

Hi,
So when will the next hotfix be released?
Thanks.

Hi

Thanks for your request. The next release will be released in a few weeks. You will be notified.
Best regards,

The issues you have found earlier (filed as 19684) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.