Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src PowerQuery advanced example. Change Java version to 8 to help tools Aug 28, 2018
DocxImport.csproj Templater v3.1.0 May 5, 2019 More example sharing (Docx import) Aug 18, 2018
pom.xml Templater v3.1.0 May 5, 2019

DOCX import

Templater recognizes Element and Element[] data types. Instead of replacing tag with a string value, XML is injected into document as-is.

While this works for trivial cases, it doesn't cover wide range of Word features (picture in the imported document will be filtered out so it doesn't corrupt resulting document).

By default Templater will inject Element after the specified tag into a new paragraph (or other appropriate level). This will leave old paragraph empty, which might lead to whitespace bloat. To deal with those scenario, Templater has few builtin metadata keywords:

  • remove-old-xml - which will remove previous paragraph after XML is inserted
  • replace-xml - which will insert XML at the place of the paragraph (instead of after it)
  • merge-xml - which will merge provided XML into the found structure
You can’t perform that action at this time.