---
updatedAt: 2026-10-15T14:09:28.000Z
agentTools:
  projectIndex: https://docs.pebblestream.com/llms.txt
---

# template-out-header

An **output fill anchor**: Zen locates this column's **header text inside the template worksheet** and starts filling the column's values adjacent to that anchor, in the column's [direction](template-out-down.md).  Multiple columns may share the same anchor header — they all start filling next to the same located header cell, each in its own direction.

`pebblestream:template-out-header`

## Syntax

```
pebblestream:template-out-header
```

* No arguments.
* Placed on the **header cell of the output column** to fill.
* Requires [`template-name`](template-name.md) on the same (output) worksheet; the
  template worksheet named there is the one that gets filled.

## How the anchor resolves

1. The output column's header text is normalized (trimmed, lower-cased,
   whitespace collapsed).
2. Zen searches the template worksheet for a cell whose text normalizes to the
   same value.
3. Filling starts at the cell next to that header, in the column's direction
   (down by default, or right with [`template-out-right`](template-out-right.md)).

## Example

Output worksheet `Results` (template `Template`):

| column | header  | comment                               |
| ------ | ------- | ------------------------------------- |
| A      | `Total` | `pebblestream:template-name:Template` |
| A      | `Total` | `pebblestream:template-out-header`    |
| B      | `VAT`   | `pebblestream:template-out-header`    |

If the template contains a header cell `Total`, the `Total` values are written
just below it (one per record), and `VAT` values next to the template's `VAT`
header.

## Errors

| Error                                 | Cause                                                                                                                        |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `dir-too-many-args`                   | Arguments were supplied.                                                                                                     |
| `template-out-conflict`               | The same column also has `template-out-cell`, a styling directive, or `template-out-group`.                                  |
| `template-out-clean-conflict`         | The sheet also has [`template-out-generate-clean`](template-out-generate-clean.md) — a clean sheet has no headers to locate. |
| `template-out-has-dependents`         | The output worksheet is used as input by another worksheet.                                                                  |
| `missing-the-template-name-directive` | The sheet has no `template-name`.                                                                                            |

## Related

* [Template directives](template-directives.md) — the output fill flow
* [template-out-cell](template-out-cell.md) — anchor by explicit A1 address
* [template-out-down](template-out-down.md) / [template-out-right](template-out-right.md) — fill direction
* [template-out-group](template-out-group.md) — advance the anchor per group