The possibility to create documents out of office templates is arguably one of the most powerful features of the the Docxpresso API Core.

With Docxpresso you may use templates as:

  • A passive receptacle that already contains structural and/or content elements.
  • An active document waiting for data to feed its “placeholder variables”.
  • A combination of both of the above.

In order to give a complete picture of all possibilities we have divided this section in the following chapters:

  • HowTo: Templates explains how to prepare an Office document to simplify the process of replacing, cloning and removing document content.
  • Document cursor explains how to locate the cursor to insert content in the desired location (by default it is always inserted at the end of the document).
  • Clone template content shows how to replicate existing document elements like list items, table rows, bookmarked content, etcetera
  • Remove template content treats how to remove with a single command aany element in the current template.
  • Replace template content carefully explains with multiple examples how to replace content marked by “placeholder variables”: plain text, images, chart data, table rows, list items, etcetera.
  • Custom templates show how to use a base template as a starting point to generate a fully dynamical document.