Merge #465 (673af7ec, with #462 at 712bb766 and main at 530a8cc8) into #2151

# Conflicts:
#	docs/macros.md
This commit is contained in:
prxnvt
2026-10-23 22:08:05 -04:00
190 changed files with 3159 additions and 478 deletions
+6 -4
View File
@@ -1,6 +1,6 @@
# Macros
> **Last updated:** 2026-10-21 · **Change:** minor (macro tokens)
> **Last updated:** 2026-10-24 · **Change:** minor (macro tokens)
GridCraft macros are typed, declarative lists of commands, not VBA. Every step runs a GridCraft
command (the same ids the ribbon, CLI and MCP use) or one of three bounded control steps. A macro
@@ -37,9 +37,11 @@ workbook. The engine has no command that runs macros in this version.
`{"command": "cell.set", "params": {…}}` is accepted for a command step.
- **Inputs**: `kind` (`cell` or `range`), `rows` and `cols` as `[min, max]` (0 for no maximum;
rows exclude the header), `header`, `colTypes` (`number`, `text`, `date`, `bool`, `any`),
`nonEmpty` and `defaultRef`. A run binds each input to the range it is given, its default, or
(for the first input) the selection, and refuses with messages that name the cells:
"Input column 2 (Amount) must hold numbers; C4 holds text."
`nonEmpty` and `defaultRef`. These declare what a range must look like for the macro to work
on it. An input's name is letters, digits and `_`, starting with a letter, and is neither a
token of its own (`Output`, `Row`, `Column`, `Name`) nor something that reads as a cell
reference (`Q1`), so a step written with plain A1 text keeps meaning the cell. This version
stores and checks the declaration; it does not bind inputs or run macros.
- **Limits**: 1,000 macros a workbook, 10,000 steps a macro, and Repeat and If nested 4 deep.
## Tokens