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.

Thu Nov 11, 2021 10:42 am

Hi,
I'm trying to use Free Spire.Doc for java Mail Merge features to populate a document with a template where the data source is a text file with the header row and then multiple rows where each row is one value set for the merge fields. It works okay if it is just one value set where I can use
Code: Select all
 document.getMailMerge().execute(fieldNames, fieldValues)
.
But when there are more than one set of fieldValues to populate as a new page in the same document, how should I proceed? There are about 300 merge fields and I have tried MailMergeDataTable. but it requires me to create a POJO class with all the fields and the output isn't accurately mail merged. Is there any other method I can use?
Thank you

chamaj95
 
Posts: 2
Joined: Tue Nov 02, 2021 10:50 am

Fri Nov 12, 2021 3:01 am

Hello,

Thank you for your inquiry.
In order to help us investigate and solve your problem quickly and effectively, please provide more information (your template file, data source text file, your current full testing code, expected result file) for our reference. You could attach them here or send us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc