template-out-style

Marks a styling column: the column is never written to the template itself — instead, each record's value in this column is the name of a stored Excel style, and that style is applied to the cells written from the same record. Stored styles are captured in Excel with the Zen add-in (Styles tab → Extract style) and live on the workflow server.

pebblestream:template-out-style[("Header1","Header2")]

Syntax

pebblestream:template-out-style
pebblestream:template-out-style("Header 1")
pebblestream:template-out-style("Header 1","Header 2")
  • No arguments — the style applies to every cell written from the row.
    At most one parameterless style column per worksheet (the default).
  • Quoted header arguments — restrict the style to exactly those data columns
    of the worksheet. Each argument must name exactly one data column (case
    insensitive). Those columns are claimed: the parameterless default never
    applies to them, so a blank value in the parameterized style column leaves
    those cells with just the base style — no fallback.
  • Requires template-name on the same (output) worksheet.
  • Cannot share a column with an anchor (template-out-header/template-out-cell)
    or with template-out-group.

Behavior

  • Style names resolve case-insensitively against the styles stored on the
    server; a name may also be a slashed reference template/style or
    provider/template/style.
  • An unknown style name is a warning only (style-not-found) — the cell is
    written unstyled and generation is never interrupted.
  • The stored style JSON includes number formatting, so number formats travel
    inside the style and never conflict with
    template-out-value-type.
  • A stored style replaces the template cell's existing formatting (it is
    cleared first), rather than merging into it.

Example

columnheadercomment
AItempebblestream:template-out-header
BAmountpebblestream:template-out-header
CRow stylepebblestream:template-out-style
DAmount stylepebblestream:template-out-style("Amount")

Row style styles the whole written row; Amount style overrides it for the
Amount column only. A record with Row style = "Report body" and
Amount style = "Currency red" writes the item/amount cells with Report body
and the amount cell with Currency red.

Errors

ErrorCause
dir-appears-multiThe same column carries the directive twice.
template-out-style-unknown-headerA header argument does not name exactly one data column (or names an anchor column).
template-out-style-conflictTwo style columns claim the same column, or more than one parameterless default.
template-out-conflictThe style column also has an anchor or template-out-group.
missing-the-template-name-directiveThe sheet has no template-name.

Runtime warning: style-not-found — the named style does not exist on the
server; the cell is written unstyled.

Related


Did this page help you?