Docly Developers
DocsUpdated 22 Oct 2026

Creating Excel output template for a Docly schema

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

Docly offers the following two alternatives for creating XLSX 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

Each top-level <table> becomes a sheet, named by its title attribute ("Sheet1", "Sheet2" … without one). Inside a sheet:

  • Rows in <thead> are frozen, and <th> cells are bold.

  • colspan and rowspan merge cells.

  • A cell whose whole content is wrapped in <b>/<strong>, <i>/<em>, <u> or <a href> gets that style or a hyperlink. Other markup in a cell is shown as text.

  • <br> gives a line break in the cell.

  • A number becomes a numeric cell — use . as the decimal separator (1.5, not 1,5). Values with a leading zero stay text.

  • A cell that contains exactly one <img> with a base64 data URL (PNG, JPEG, GIF or BMP) gets the image. Set the size with width and height.

These CSS properties are supported in the style attribute of a cell:

  • background-color and color

  • text-align (left, center, right, justify) and vertical-align (top, middle, bottom)

  • border, border-top, border-right, border-bottom and border-left — width 1px–3px or thin/medium/thick, style solid, dashed, dotted, double or none, and a colour. <table border="1"> gives every cell a thin black border.

font-size, font-family, font-weight (bold or 600+), font-style (italic) and white-space (wrapping) are applied too. Other CSS — such as padding — is ignored, and nested tables are not supported. 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 Excel file:

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.