Lookup, Reference & Dynamic Arrays
AI Assistant Sheet & Grid Commands: Add/Rename Tabs & 1-Based Row/Column Edits
Learn how Arte Sheets’ AI Assistant executes create_sheet, rename_sheet, select_sheet, and 1-based insert/delete row and column commands (1..20 count) with protected-sheet and role guardrails, plus write row-insertion-safe total formulas.
Exact structural guardrails for AI sheet management and row/column insertions in Arte Sheets
When you ask Arte Sheets’ AI Assistant (available on eligible plans with a verified email and metered monthly AI credits) via text or voice to reorganize a workbook structure,js/assistant/commands.js validates every structural command client-side before mutating the workbook: create_sheet and rename_sheet require a non-empty trimmed tab name <= 31 characters containing none of \ / ? * [ ] :, reject duplicate tab names, cap workbooks at 200 sheets total, and refuse to rename protected sheets!
For grid structure, insert_rows, delete_rows, insert_columns, and delete_columns use 1-based worksheet coordinates (1 <= index <= 1,000,000 for rows; 1 <= index <= 16,384 for columns) with a strict per-command cap of 1 <= count <= 20 (and deletion is only triggered when explicitly requested). Structural commands are blocked with readonly for viewer and suggester roles, in suggest mode, and on protected sheets. Tip: anchor your summary totals one blank buffer row below line items—or sum across an explicit header-to-footer boundary—so inserting new rows inside the table automatically expands your SUM!
| AI Structural Action | Validated Bounds in js/assistant/commands.js | Role & Protection Guardrail |
|---|---|---|
| create_sheet / rename_sheet / select_sheet | Unique trimmed name <= 31 chars; forbids \ / ? * [ ] :; <= 200 sheets | Blocked on protected sheets, viewer/suggester roles, and suggest mode |
| insert_rows / delete_rows | 1-based index (1..1,000,000), count 1..20; delete only when requested | Refuses protected sheets; multi-step execute_steps caps total row/col edits <= 20 |
| insert_columns / delete_columns | 1-based index (1..16,384), count 1..20 | Refuses protected sheets and read-only / suggest sessions |
Sheet-Name Validity Check Formula (<= 31 Chars & No Forbidden \ / ? * [ ] : Characters)
Pre-validates a proposed tab name in B2 against the exact 31-character and forbidden-symbol rules enforced by Excel and Arte Sheets.
=IF(OR(ISBLANK(B2), LEN(TRIM(B2 & "")) = 0, LEN(TRIM(B2 & "")) > 31), "Invalid Length (1..31 Chars)", IF(ISNUMBER(FIND(":", B2)) + ISNUMBER(FIND("/", B2)) + ISNUMBER(FIND("\", B2)) + ISNUMBER(FIND("?", B2)) + ISNUMBER(FIND("*", B2)) + ISNUMBER(FIND("[", B2)) + ISNUMBER(FIND("]", B2)) > 0, "Contains Forbidden Sheet Character", "Valid Sheet Name"))Department Budget Total After Inserting Line-Item Rows =ROUND(SUM(E2:E6), 2)
Sums budget rows E2:E6 including newly inserted line-item row E5.
=ROUND(SUM(E2:E6), 2)Try the example
Use the original values or change them to test your understanding.