Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Dec 30, 2014 3:10 pm

Hi,

I'm trying to get a simple MailMerge to work with a Word template. Everything works fine, except for the formatting. When I use the formatting:

\# "###,##0"

It should output: 1,234
But it outputs: 1234
So in speaking language Thousand-twohoundred-thirty-four

(Decimals do function correctly, and \# "### ##0" outputs 1 234, so that's correct as well.)

It simply seems to ignore the comma. What I'm I missing here?

Thanks,
Misja

misja.vansitteren
 
Posts: 3
Joined: Tue Dec 30, 2014 9:13 am

Wed Dec 31, 2014 2:20 am

Dear Misja,

Thanks for your inquiry.

After testing with Spire.Doc v5.3.11, I can see that Spire.Doc supports both formats(\# "###,##0" and \# "### ##0") you provided when do mail merge, you can download it via link below and have a try:

http://www.e-iceblue.com/Download/downl ... t-now.html

If you still have this problem after testing with Spire.Doc v5.3.11, please upload your sample document and code snippet to help us reproduce this issue.

Thank you.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Thu Jan 01, 2015 10:14 am

Hello,

Has the issue been resolved? Could you please give us some feedback if convenience? If not, please provide your sample document and code snippet,which is helpful to reproduce this issue and work out the solution for you ASAP.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Jan 02, 2015 7:46 am

Hi!

Thanks for the reply, and sorry for being late. I have been from work for 1.5 day ;)

We have only started three days ago with Spire.doc, so we are still working with the free version 5.2. If all goes well we are planning to buy the full version. For now, could you indicate if this conversion should work in the free version?

In the attachment there is a template with one merge field.
I'm not allowed to upload the docx, but the file only contains this Merge Field:
{MERGEFIELD Variable \# ###,###,##0}


The number from the row is a simple string, like "1234".

Code: Select all
                listRow = New List(Of String)
                For Each tempRowValue As Object In .GetValues
                    listRow.Add(tempRowValue.ToString)
                Next
                arrayRow = listRow.ToArray


            Dim document As New Spire.Doc.Document()
            document.LoadFromFile(tempPathAndFile, Spire.Doc.FileFormat.Auto)
            document.MailMerge.Execute(arrayColumns, arrayRow)
           document.SaveToFile(pdfFileLocation, Spire.Doc.FileFormat.PDF)



Another question: we need to create letters which could be in American style notation, like:
$ 1,234.00
And in Dutch way of notation:
€ 1.234,00

Is this something which Spire does, or is it something we need to change on our ends with the regional settings?

misja.vansitteren
 
Posts: 3
Joined: Tue Dec 30, 2014 9:13 am

Fri Jan 02, 2015 8:45 am

Dear Misja,

1) In your code snippet I noticed that you converted the word docuemnt to pdf document. And after testing with commercial version and free version, I can see that it has a wrong format in the generated pdf document like you said. I have posted it to our dev team.

2) About regional settings. Spire.Doc supports mail merge format. All you have to do is setting the different format manually, for example:
American notation {MERGEFIELD Variable \# $###,###,##0.00}
Dutch notation: {MERGEFIELD Variable \# $###.###.##0,00}

Anyway, we will inform you if there is any update about this mail merge format issue and please feel free to contact us if you have any problems.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Fri Jan 02, 2015 9:02 am

If we convert it to docx it will give the same (wrong) output. So it's not the PDF conversion.

If I understand you correctly, is this problem also occuring in the commercial version? Otherwise we can give it a try as well.

misja.vansitteren
 
Posts: 3
Joined: Tue Dec 30, 2014 9:13 am

Fri Jan 02, 2015 9:21 am

Dear Misja,

This error just occurs after the pdf conversion, with both commercial version and free version.

And the generated docx file displays good format as it is supposed to be.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Sat Jan 10, 2015 5:37 pm

Dear Burning,

I am a collega of Misja van Sitteren and I must complete our application with your Spire.Doc. In your last reply you said that the numeric switch is a problem in creating the pdf file, in both the free and the commercial version. When is this problem solved? I must complete our application next week, is that possible?

Kind regards,

John Leeuwis

john.leeuwis@emanon.nl
 
Posts: 12
Joined: Tue Dec 30, 2014 8:43 am

Mon Jan 12, 2015 1:34 am

Dear John,

Sorry for the delay response.

From our dev team news that they confirmed this problem has been fixed and the new version of Spire.Doc is under testing, we will inform you when the new version is available.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Fri Jan 23, 2015 11:59 am

What is the status of the testing and when comes the new version available?

john.leeuwis@emanon.nl
 
Posts: 12
Joined: Tue Dec 30, 2014 8:43 am

Mon Jan 26, 2015 1:28 am

Hello John,

Sorry for the delay reply.

This problem has been resolved in Spire.Doc v5.3.26, you can download it via the link below and have a try:
http://www.e-iceblue.com/downloads/hot_ ... 5.3.26.zip

Note: This version is not released, so there might be some other bugs.
Best Regards,
Burning
E-iceblue Support Team
User avatar

burning.liu
 
Posts: 406
Joined: Mon Aug 04, 2014 6:47 am

Return to Spire.Doc