Our solution provides a powerful platform independent API. Use our Mail merge document API to develop high-level software for .NET and .NET Core platforms. This is a powerful software solution for merging templates in Word and PDF formats and data from custom data sources and further exporting the result to DOCX, PDF, HTML and other popular formats using C#.
Powerful .NET library to use mail merge operation with mustache template and user data.
This C# SDK allows you to use Mustache templates based on the Mustache syntax and execute mail merge operations on this logic-less template to fill the document with data from various data sources. You can export the result into the required document format: DOCX, PDF, HTML and other popular formats using C#.
Mustache is an alternative syntax for mail merge templates that consists of tags. To create a mustache template, use tags specified by the double braces as follows:
{{FirstName}}
In this case, you can find such tags inside the template and replace them with values determined by the key inside the tag. It is called logic-less templates because there are no if statements, else clauses, or for loops.
Mustache syntax is the only option that can be used with HTML or TXT templates that do not contain any fields. This means that with some template formats, such as Word templates, you can use both fields and mustache syntax, and with others, such as HTML or TXT, only mustache template syntax.
You can try our solution to perform mail merge operation with a mustache template in .NET. After running the code, export the mail merge result using C# to a convenient file format such as DOCX or PDF:
dotnet add package Aspose.Words
Copy
using Aspose.Words;
var fields = new string[]
{
};
var values = new object[]
{
};
var doc = new Document("Input.docx");
doc.MailMerge.UseNonMergeFields = true;
doc.MailMerge.Execute(fields, values);
doc.Save("Output.docx");
There are three alternative options to install "Aspose.Words for .NET" onto your system. Please choose one that resembles your needs and follow the step-by-step instructions:
Our product is fully cross-platform and supports all major .NET implementations:
As far as .NET code doesn't depend on the underlying hardware or operating system, but only on a Virtual Machine, you are free to develop any kind of software for Windows, macOS, Android, iOS and Linux. Just make sure you have installed the corresponding version of .NET Framework, .NET Core, Windows Azure, Mono or Xamarin.
We recommend using Microsoft Visual Studio, Xamarin, and MonoDevelop integrated development environments to create C#, F#, VB.NET applications.
Fore more details please refer to Product Documentation.
You can perform Mail merge operation for other file formats: