Creating Excel output template for a Docly schema Last updated: 18. Jun 2023

This guide shows you how to setup output templates in Docly schemas that produce Excel-files as output (XLSX).

Docly offers the following two alternatives for creating XSLX files:

  • Creating Excel files from integrated designer (HTML)
  • Creating Excel files with an XLSX as the template

See the chapters below for more information about each approach.

Creating Excel files from integrated designer (HTML)

> Creating a single sheet

Create a custom form. Example:

Open the templates tab and add a template, then click the pencil button:

Note that the template needs a .xlsx ending in the template ID.

Here is an example template:

<table title="Sheet1">
    <thead>
        <tr>
            <th>Header 1</th>
            <th>Header 2</th>
            <th>Header 3</th>
        </tr>
    </thead>
    <tbody>
        <tr data-loop="Items">
            <td>#Field1#</td>
            <td>#Field2#</td>
            <td>#Field3#</td>
        </tr>
    </tbody>
</table>

> Adding more sheets

Simply add more tables to the output and name your sheets with the "title" attribute:

<table title="Sheet1">
    <thead>
        <tr>
            <th>Header 1</th>
            <th>Header 2</th>
            <th>Header 3</th>
        </tr>
    </thead>
    <tbody>
        <tr data-loop="Items">
            <td>#Field1#</td>
            <td>#Field2#</td>
            <td>#Field3#</td>
        </tr>
    </tbody>
</table>

<table title="Sheet2">
    <thead>
        <tr>
            <th>Header 1</th>
            <th>Header 2</th>
            <th>Header 3</th>
        </tr>
    </thead>
    <tbody>
        <tr data-loop="Items2">
            <td>#Field1#</td>
            <td>#Field2#</td>
            <td>#Field3#</td>
        </tr>
    </tbody>
</table>

> Styles in work sheets

The following styles are supported:

  • background-color
  • color

Styles must be placed in the style attribute, see example:

<table title="Sheet1">
    <tbody>
        <tr data-loop="Items">
            <td style="background-color:#ff7722">#Field3#</td>
        </tr>
    </tbody>
</table>

Creating Excel files with an XLSX as the template

> Creating a single sheet

Create a custom form. Example:

Open the templates tab and add a template, then upload your Excelfile:

Note that the template needs a .xlsx ending in the template ID.

Here is an example template:

A template like this can contain any objects and format you desire.