---
updatedAt: 2026-10-15T13:54:00.000Z
agentTools:
  projectIndex: https://docs.pebblestream.com/llms.txt
---

# rightmost-column

Marks a column that receives a **constant**: the index of the last (rightmost) column of the record's _block_ inside the template worksheet.

`pebblestream:rightmost-column`

Together with [`leftmost-column`](leftmost-column.md), [`top-row`](top-row.md) and
[`bottom-row`](bottom-row.md) it describes the bounding rectangle of the table the
record was extracted from.

## Syntax

```
pebblestream:rightmost-column
```

* 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 left`  | `pebblestream:leftmost-column`        |
| B      | `Block right` | `pebblestream:rightmost-column`       |
| C      | `Item`        | `pebblestream:template-name:Partners` |

Every record extracted from a block ending at column `E` of the template gets that
column index in `Block right`.

## 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
* [leftmost-column](leftmost-column.md) — the other horizontal bound
* [block-id](block-id.md) — which block the record came from