Templater 5.1.1

Supported formats: docx (docm) - Microsoft Office Open XML document format xlsx (xlsm) - Microsoft Office Open XML spreadsheet format pptx (pptm) - Microsoft Office Open XML presentation format csv, txt, utf8 - Text format (can be used for comma separated values - spreadsheet document)

Tag formats: [[TAG]] [[TAG]:metadata1:metadata2] {{TAG}} {{TAG}:metadata1:metadata2} <> <:metadata1:metadata2>

User manual: https://templater.info/user-manual Change log: https://templater.info/change-log License: https://templater.info/eula

Various examples: https://github.com/ngs-doo/TemplaterExamples

Default datatypes (.NET/JVM): DataSet/NA - special keyword: clone DataTable/NA - special keyword: fixed DataRow/NA IEnumerable/Iterable - special keywords: clone, fixed IDictionary/Map object/Object - special keyword: all IDataReader/ResultSet - special keyword: fixed

Navigation: By default navigation is done via . (DOT) Navigation plugins are disabled by default. To enable them metadata separator must be defined. This enables usage of metadata during path evaluation and will invoke navigation plugins.

Keywords: clone - used for cloning entire document. Templater will append current document with current content. fixed - used in resizeable objects (like table) when you don't want to resize that object. For example, you have table with fixed number of rows and want Templater to replace those IEnumerable values and replace all others with empty string page - used for specifying resizing of the page range in docx. When tag is placed in table and you want to resize entire page, not number of rows in that table, use page to override default context resize sheet - used for specifying resizing of the sheet in xlsx. If you want to resize sheet range you can place tag in header or use sheet metadata on tag which is used for resizing. all - replaces all instances of selected tag with provided values. Useful when there is same tag on various places in document and Templater is unable to conclude that they should all be replaced with single value header - for DataTable/ResultSet/jagged arrays data types, include header during dynamic resize horizontal-resize - in Excel resize context horizontally instead of vertically whole-column - use whole column instead of minimum spanning range during horizontal resize merge-nulls - special handling of null values in tables/cells. Cells will be horizontally merged if null value is detected span-nulls - special handling of null values in Word tables. Cells will be vertically merged if null value is detected remove-old-xml - when XElement/Element is provided, remove the XML tree where tag was detected. Useful for cleaning up whitespace garbage replace-xml - when XElement/Element is provided, remove the children of matching XML tree and replace it with the provided XML. Useful for setting color in Word tables merge-xml - when XElement/Element is provided, merge provided XML with the surounding XML of the detected tag. Useful for setting color without removing old XML page-break - when doing resize include page break between elements (probably should not be used) no-repeat - to invoke old behavior of processing only the first collection with matching tags (probably should not be used)

Default plugin keywords: format - if encountered on date value it will replace DateTime value with string value (short date string if time part is empty) format(X) - replaces current value formatted by X argument (for example N2 for number with two decimals) substring(n) - returns substring of provided values after n chars substring(n,l) - returns substring of provided values after n chars with l length padLeft(n) - append space from left to create string of at least n length padLeft(n,c) - append char c from left to create string of at least n length padRight(n) - append space from right to create string of at least n length padRight(n,c) - append char c from right to create string of at least n length join(X) - flattens array to create a string with X between (for example {1,2,3}.join(-) becomes 1-2-3) hide - replaces current value with empty string empty(X) - if value is null or empty (IEnumerable.length = 0) it will replace value with X bool(yes,no) - boolean value will be converted to yes or no bool(YES,NO,MAYBE) - boolean value will be converted to YES, NO or MAYBE offset(D:H:M) - DateTime value will be offsetted by parsed Timestamp (special sign : is escaped with ) collapse - if value is null or empty (IEnumerable.length = 0) current context will be collapsed; tag will be removed - resize(tag, 0) will be invoked collapse-nested - if value is null or empty (IEnumerable.length = 0) context matching all related tags will be collapsed; specified and all nested tags will be removed - resize(tags, 0) will be invoked collapse-to(otherTag) - if value is null or empty (IEnumerable.length = 0) current context between original and otherTag will be collapsed; tags will be removed - resize(Array(tag, otherTag), 0) will be invoked. Other tag can have same value as original tag

Special datatypes: Image/Icon/ImageInputStream - convert to image (JVM version uses 96dpi for Image, ImageInputStream preserves DPI and image type) XElement/Element - insert XML as is into document IEnumerable/Array[Element] - insert XMLs as is into document DataTable/ResultSet - dynamic resize Array ([,] or jagged with same dimensions) - dynamic resize IList<IList>, List<List> (with same dimensions) - dynamic resize ImageInfo - internal image data type (Java BufferedImage and ImageInputStream and .NET System.Drawing.Image and Icon will be converted into ImageInfo via builtin plugins)

Navigation plugins: at(N) - instead of processing collection, use element at specific index from the collection to continue processing top(N) - process only top N elements of the collection

PDF conversion: Templater doesn't support PDF format, but other tools can be used to convert docx->PDF. Example of LibreOffice usage for PDF conversion:

C:\Program Files (x86)\LibreOffice 4\program\soffice.exe -norestore -nofirststartwizard -nologo -headless -convert-to pdf input-document.docx

will result in input-document.pdf file. Please note that LibreOffice doesn't support full range of Microsoft Office features and as such have issues with very complicated documents. Best thing to do in that case is to tweak the document template in Word, until LibreOffice can display it like Word. Docker file for convenient PDF conversion is available at: https://github.com/ngs-doo/TemplaterExamples/tree/master/Advanced/TemplaterServer

Templater Editor: Templates can be managed in any editor which supports Open Office XML format. For best experience templates should be managed in Microsoft Office with the help of Templater Editor Add-In for Microsoft Office.

Showing the top 20 packages that depend on Templater.

Packages Downloads
Finsa.CaravanCore
Package Description
30
Finsa.CaravanCore
Package Description
33
Finsa.CaravanCore
Package Description
34
Finsa.CaravanCore
Package Description
50
Finsa.CaravanCore
Package Description
64
Finsa.CaravanCore
Package Description
65
Finsa.CaravanCore
Package Description
74
Finsa.CaravanCore
Package Description
87
Finsa.CaravanCore
Package Description
99
Finsa.CaravanCore
Package Description
105
Finsa.CaravanCore
Package Description
106
Finsa.CaravanCore
Package Description
152
Finsa.CaravanCore
Package Description
177
Finsa.CaravanCore
Package Description
288
Finsa.CaravanCore
Package Description
384
Finsa.CaravanCore
Package Description
431
Finsa.CaravanCore
Package Description
473
Finsa.CaravanCore
Package Description
574
Finsa.CaravanCore
Package Description
1,254
Finsa.CaravanCore
Package Description
2,164

5.1.1 - Debugging integration bugfixes 5.1.0 - Debugging support with Templater Editor. Handler API breaking change 5.0.1 - Schema integration bugfixes 5.0.0 - Schema integration with Templater Editor. Navigation plugins 4.6.0 - Tag alias support. Various improvements and bugfixes 4.5.0 - Improved image support. Various improvements and bugfixes 4.4.0 - Embedded CSV in Excel support. Low level API breaking change. Other improvements 4.3.0 - Excel resize(tags, 0) improvements. Pull right/up and sheet removal/hiding 4.2.0 - SVG support. Whole row/column range support. Horizontal resize regression bugfix 4.1.0 - Custom ImageInfo type. Method blacklisting. Various bugfixes and improvements 4.0.1 - Image formats improvement. Excel performance optimizations 4.0.0 - PowerPoint support. License key change 3.2.1 - Missing tags handling changes. Various bugfixes 3.2.0 - Improved streaming support. Excel drawing improvements. Various bugfixes 3.1.0 - New configuration API. Dynamic type improvements. Excel bugfxies 3.0.0 - Major context detection improvements. Support for <<tag>> pattern. Various bugfixes 2.9.6 - CSV streaming support. Bugfixes and improvements 2.9.5 - Improved CSV support for complex documents. Excel formula fixes 2.9.4 - Comments support in Excel. GetMetadata(tag, true) behavior change 2.9.3 - CSV performance improvements. Various bugfixes and improvements 2.9.2 - Excel escape codes. Improved context/missing tag handling 2.9.1 - Word 2016 support improvements. Hyperlink improvements. Formula invalidation 2.9.0 - Removed support for .NET Standard 1.6. Low level API change 2.8.4 - .NET Standard 2.0. Formula parsing bugfix 2.8.3 - Word vertical merge. Bugfixes 2.8.2 - Resize limits. Thread interrupts 2.8.1 - Excel bugfixes 2.8.0 - Word 2016 support improvements. Multiple tables within a sheet. Handler breaking changes 2.7.5 - List numbering regression bugfix 2.7.4 - Named range improvements. Cope with missing/null keys in Dictionary. Multiline graph support in Word 2.7.3 - Wide spreadsheets bugfix 2.7.2 - Large document performance regression fix. Formula rewriting improvements 2.7.1 - Excel drawing resize bugfix 2.7.0 - .NET Standard 1.6. XML bindings. TAG regex customization. Repeat collection by default 2.6.0 - Support for tags in sheet names 2.5.2 - DataSet improvements. Wide spreadsheet guards 2.5.1 - Support for sections in Word 2.5.0 - Replace plugin API. XML improvements. Support for content control in custom XML 2.4.2 - Merge cell and list numbering bugfixes 2.4.1 - Nested collection bugfixes 2.4.0 - Footnotes and endnotes support. merge-cells metadata feature. Dynamic resize style cloning 2.3.3 - XML support in Excel. Conditional formatting support 2.3.2 - Shapes, Watermarks and other object support in Word. Map collection processing bugfix 2.3.1 - Word context detection improvements. Merge cell cloning/resizing bugfix 2.3.0 - New low level API. Improved XML support. Hyperlink support in Excel. New scenarios detected 2.2.1 - AutoFilter recalculation. Improved fast-path detection 2.2.0 - Charts in Word. Formula rewriting. Horizontal resize. Push to right. Various other improvements 2.1.5 - Word dynamic resize improvements 2.1.4 - Replace all improvements. Pushdown on dynamic resize 2.1.3 - Excel height cloning. Context detection fixes 2.1.2 - Whitespace detection fixes. Context detection changes 2.1.1 - Page break change. XML support in Word. :all metadata improvements 2.1.0 - Resize document with picture bugfix. Macro enabled documents. Hyperlink support in Word 2.0.4 - Multiple row resizing bugfix 2.0.3 - Word header/footer regression bugfix. Empty formatter changes 2.0.2 - Excel bugfixes 2.0.1 - Word clone/resize header/footer fix 2.0.0 - {{tag}} support. User registered plugins. Dynamic types support (dictionary/maps). Various improvements

.NET Framework 4.0

  • No dependencies.

.NET Standard 2.0

Version Downloads Last updated
8.2.0 10 04/16/2025
8.1.0 22 09/29/2024
8.0.0 25 02/14/2024
7.3.0 23 02/14/2024
6.2.0 42 02/18/2022
6.0.0 24 08/03/2021
5.2.0 26 03/02/2021
5.1.1 23 12/21/2020
5.1.0 24 12/18/2020
5.0.1 128 10/28/2020
5.0.0 40 10/23/2020
4.6.0 1,069 09/14/2020
4.5.0 33 08/06/2020
4.4.0 42 07/09/2020
4.3.0 28 02/11/2020
3.2.1 21 02/14/2024
2.9.6 80 02/11/2020
2.8.0 25 02/10/2020
2.6.0 24 02/10/2020
2.5.1 20 02/10/2020
2.5.0 24 02/10/2020
2.4.2 21 02/10/2020