Numbers: insert
numbers_insertInsert rows or columns into an existing Apple Numbers table at a chosen position, or append them, optionally filled with values; dry_run previews changes.
Instructions
Insert rows or columns (what = rows | columns) before 1-based position at; omit at to append. Optional values: one list per new row (or column). Every existing cell is verified at its new position. In tables with formulas, only appending is allowed (shifting would break references). dry_run=true previews the change on a copy without touching the file. Use to add rows or columns to an existing table (optionally filled). For a separate table use numbers_add_table. In tables with formulas only appending works; do mid-table inserts in Numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | 1-based position to insert before; omit to append at the end. | |
| path | Yes | Path to the .numbers file (absolute, or starting with ~). | |
| what | Yes | rows | columns. | |
| count | No | How many to insert. | |
| sheet | No | Sheet name. Omit when the file has one sheet (iwork_read lists sheets and tables). | |
| table | No | Table name on that sheet. Omit when the sheet has one table. | |
| values | No | Optional contents: one list per new row (or column), e.g. [["Riyadh", 1200]]. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||