/templ-dot-net

A C# report generation engine combining strongly-typed models and annotated .docx templates.

Primary LanguageC#GNU General Public License v2.0GPL-2.0

Templ.NET

NuGet | Templates | Example | Documentation

NuGet Downloads NugetVersion


A C# report generation engine, combining .docx templates with strongly-typed data models.

Templ.NET is built upon the DocX library.


Install via Nuget

PM> Install-Package Templ.NET

Simple Usage

HelloWorld Before

HelloWorld After

var document = Templ.Load("C:\template.docx").Build( new { Title = "Hello World!" });

// Console application
document.SaveAs("C:\output.docx");

// ASP.NET MVC controller 
return new FileContentResult(document.Bytes, Templ.DocxMIMEType);