Keynote: add table
keynote_add_tableAdd a formatted table to an existing Keynote slide from row data, with optional design-kit styling, positioning, and dry-run preview before changes.
Instructions
Add a table to a slide (1-based). rows = [["Region", "Q1"], ["Riyadh", 1200], …]: text, numbers, or null; text starting with "=" is a formula. kit (iwork_list_design_kits name or your own) styles it: header band, fonts (Arabic-aware), banding, numbers right-aligned. Optional x, y (points from top-left) and width. Every cell, font and colour is read back; other slides and tables are checked untouched. At most 50 rows × 15 columns. dry_run=true previews the change on a copy without touching the file. Needs macOS + Keynote. Use for a table on an existing slide. In a new deck, put it in keynote_build_deck's outline; to show a trend use keynote_add_chart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge in points (give with y); omit to let Keynote place it. | |
| y | No | Top edge in points (give with x). | |
| kit | No | A design kit: a name from iwork_list_design_kits (preset or saved, e.g. "executive", "Resal") or your own {"fonts": {...}, "colors": {"title": "#RRGGBB", ...}}. Contrast is checked. | |
| path | Yes | Path to the .key deck (absolute, or starting with ~). | |
| rows | Yes | The table, header first: [["Region", "Q1"], ["Riyadh", 1200]]; text, numbers or null; "=…" is a formula. | |
| slide | Yes | Slide number, 1-based (keynote_list_slides lists them). | |
| width | No | Table width in points; omit for Keynote's default. | |
| dry_run | No | true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user. | |
| header_rows | No | How many rows at the top are headers (styled and kept on top). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||