Hi!
I'm evaluating Spire.Doc for our needs. Our software is used in most of the Scandianvia countries (mainly Denmark, but also Sweeden, Norway, and Finland) and we have a need for localization. Hence, I'm doing a test for MailMerge using a Word template formulated in a Danish Word, and some dummy data from a dataset.
In Danish the number "one hundred" with to decimals is written: 100,00. In USA, the same number is written: 100.00.
Word gives the abillity to format data comming from a MergeField. Fx. dates can be formatted to you hearts content. I'm glad to see that the formatting acutally is executed when performing MailMerge via Spire.Doc.
So what's the deal, then? Well, I'm having problems formatting decimal numbers.
In my Danish Word template I have:
Decimal(,): {MERGEFIELD "Decimal" \# "0,00"}
Decimal(.): {MERGEFIELD "Decimal" \# "0.00"}
This results to the following in after doing a MailMerge in Danish Word :
Decimal(,): 123,87
Decimal(.): 124
which is expected as, dot marks a thousand-separator in Danish.
Using your Spire.Doc I get this result:
Decimal(,): 123.87
Decimal(.): 12400"
which is wrong in more than one aspect.
1) Spire.Doc did recognize the decimal separator in the first row, but fails to show it correctly. It uses dot in stead of comma.
2) using the dot as thousand separator is expectedly giving weird results, but why the "? I have made a precise representation of the formulas entered above.
How do I make Spire.Doc show the comma in stead of the dot? I'm not able to format (ToString()) the data myself?
/Thomas