We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Numeric Format Broken After Update to ASpose.Words.NET v17.6.0.0

After updating from Aspose.Words.net dll version to, the numeric formatting of German mail merge values has changed. A sample of the change is attached in PDF format.

Please advise if this is a known problem, and if addition information in required to troubleshoot.

Thanks, John

Hi John,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Please find the pertinent template and code attached. While I certainly appreciate how perfectly a working solution would facilitate the debugging process, we do not have the bandwidth at present to convert our extensive application into a functioning console application. Please review the attachments (which have not changed across Aspose.Words versions) to see if something is obvious that would no longer work in the latest Aspose.Words version.

Thanks, John

Hi John,

Thanks for sharing the detail. Unfortunately, it is difficult to say what the problem is without simplified application. However, we will write the code for your scenario and test it. We will share our finding along with code example here for your kind reference. Thanks for your cooperation.
Hi John,

We have tested the scenario using following code example and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15528. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("de-DE")

Console.WriteLine(Convert.ToDouble(20).ToString("#,##0.##", System.Threading.Thread.CurrentThread.CurrentCulture).Trim())

Console.WriteLine(Convert.ToDouble(5945800).ToString("#,##0.##", System.Threading.Thread.CurrentThread.CurrentCulture).Trim())

Dim table As New DataTable("dtRFQItemPricing")

table.Columns.Add("quantity", GetType(Double))

table.Columns.Add("minimum_release", GetType(Double))

Dim newRow = table.NewRow()

newRow("quantity") = 20

newRow("minimum_release") = 5945800


Dim doc As New Document("Template(de-DE).docx")

doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveContainingFields Or MailMergeCleanupOptions.RemoveEmptyParagraphs Or MailMergeCleanupOptions.RemoveUnusedFields Or MailMergeCleanupOptions.RemoveUnusedRegions

' Add a handler for the MergeField event.

doc.MailMerge.FieldMergingCallback = New HandleMergeField()

' Execute mail merge.



Private Class HandleMergeField

Implements IFieldMergingCallback


''' This is called when merge field is actually merged with data in the document.


Private Sub IFieldMergingCallback_FieldMerging(e As FieldMergingArgs) Implements IFieldMergingCallback.FieldMerging

If e.DocumentFieldName.Equals("quantity") OrElse e.DocumentFieldName.Equals("minimum_release") Then

e.Text = Convert.ToDouble(e.FieldValue).ToString(e.Field.Format.NumericFormat, System.Threading.Thread.CurrentThread.CurrentCulture).Trim()


End If

End Sub

Private Sub IFieldMergingCallback_ImageFieldMerging(e As ImageFieldMergingArgs) Implements IFieldMergingCallback.ImageFieldMerging

' Do nothing.

End Sub

End Class


The issues you have found earlier (filed as WORDSNET-15528) have been fixed in this Aspose.Words for .NET 17.7 update and this Aspose.Words for Java 17.7 update.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan