Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 1.33 KB

README.md

File metadata and controls

34 lines (21 loc) · 1.33 KB

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);