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