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

# top-row

Marks a column that receives a **constant**: the index of the first (top) row of the record's _block_ inside the template worksheet.  Together with [`bottom-row`](bottom-row.md), [`leftmost-column`](leftmost-column.md) and [`rightmost-column`](rightmost-column.md) it describes the bounding rectangle of the table the record was extracted from.

`pebblestream:top-row`

## Syntax

```
pebblestream:top-row
```

* No arguments.
* Placed on the **header cell of the column** that should hold the constant.
* Requires [`template-name`](template-name.md) on the same worksheet.

## Example

| column | header         | comment                   |
| ------ | -------------- | ------------------------- |
| A      | `Block top`    | `pebblestream:top-row`    |
| B      | `Block bottom` | `pebblestream:bottom-row` |
| C      | `Item`         |                           |

Every record extracted from a block starting at row `4` of the template gets `4`
in the `Block top` column.

## Errors

| Error                                 | Cause                             |
| ------------------------------------- | --------------------------------- |
| `dir-too-many-args`                   | Arguments were supplied.          |
| `missing-the-template-name-directive` | The sheet has no `template-name`. |

## Related

* [Template directives](template-directives.md) — how extraction works
* [bottom-row](bottom-row.md) — the other vertical bound
* [block-row-count](block-row-count.md) — height of the block