# sheets

> Every coline sheets command, with its flags and the action it runs.

Source: https://docs.coline.app/cli/reference/sheets

{/* Generated by apps/docs/scripts/cli-reference.ts from coline's command tree and the cli action catalog. Don't edit it: run `pnpm --filter @colineapp/docs cli:reference`. */}

Sheets: export, import and every sheets action. Every `coline sheets` command, 33 in all.

## sheets export

A sheet's table as the web app exports it: through the table's view (its filters, sorting and hidden columns), with formula columns computed. Lookup and rollup columns hold what the web app's export holds. To stdout, or to a file with -o (its extension picks the format). xlsx holds every table unless --table names one. Name the sheet by its link, its id or its title.

```text
coline sheets export <sheet> [flags]
```

**Built into coline.** · **Calls** `sheets.list`, `sheets.open`, `GET /api/workspaces/[workspaceSlug]/sheets/[sheetId]/export` · **Effect** read, changes nothing · **Can wait for your approval** no

| Flag                  | What it does                                                                                             |
| --------------------- | -------------------------------------------------------------------------------------------------------- |
| `--table <name>`      | The table to export; default: the one the sheet opens on.                                                |
| `--format <format>`   | csv (default), xlsx, json or jsonl; default: from -o's extension. One of `csv`, `xlsx`, `json`, `jsonl`. |
| `-o, --output <path>` | Save to this file (or into this folder), inside the current folder; - is stdout.                         |
| `--force`             | Replace a file that is already there.                                                                    |

```bash
coline sheets export 'Hiring pipeline' > hiring.csv
coline sheets export https://coline.app/acme/sheets/9f2c… -o hiring.xlsx
coline sheets export 9f2c… --table Candidates --json --fields Name,Stage
```

## sheets import

Add rows to a sheet's table from CSV, TSV, JSON, JSON lines or xlsx, as the web app imports them; nothing in the sheet is changed or removed. Columns are matched by name; case doesn't matter. For CSV and JSON lines, a column the table doesn't have is an error unless you pass --add-columns (the table gets it) or --ignore-unknown (it is left out); other formats add the columns the table lacks.

\--new-table adds the file as a new table; --new \<file> makes a new sheet named after the file. --dry-run says how many rows and which columns, and adds nothing.

```text
coline sheets import <sheet> <file|->  |  --new <file> [flags]
```

**Built into coline.** · **Calls** `sheets.list`, `sheets.open`, `POST /api/workspaces/[workspaceSlug]/sheets/[sheetId]/import`, `POST /api/workspaces/[workspaceSlug]/sheets/import` · **Effect** write · **Can wait for your approval** no

| Flag                | What it does                                                                                                            |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `--table <name>`    | The table to add to; default: the one the sheet opens on.                                                               |
| `--new-table`       | Add the file as a new table in the sheet.                                                                               |
| `--new`             | Make a new sheet from the file.                                                                                         |
| `--format <format>` | The file's format; default: from its extension, or what stdin looks like. One of `csv`, `tsv`, `json`, `jsonl`, `xlsx`. |
| `--add-columns`     | Add columns the table doesn't have.                                                                                     |
| `--ignore-unknown`  | Leave out columns the table doesn't have, or that Coline fills itself.                                                  |

```bash
coline sheets import 'Hiring pipeline' candidates.csv
coline sheets import 9f2c… rows.jsonl --table Leads --dry-run
coline sheets import --new budget.xlsx
```

## sheets agent-column fill

Runs an agent column's instruction for some rows, or every row (only empty cells by default).

```text
coline sheets agent-column fill [flags]
```

**Action** `sheets.agentColumn.fill` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag               | What it does                                            |
| ------------------ | ------------------------------------------------------- |
| `--sheet-id <id>`  | Sheet id from search, fetch or create\_sheet. Required. |
| `--field-id <id>`  | Required.                                               |
| `--table-id <id>`  | Required.                                               |
| `--row-ids <list>` |                                                         |
| `--only-empty`     | Default true.                                           |
| `--input <file>`   | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets agent-column fill -w acme --sheet-id <sheet-id> --field-id <field-id> --table-id <table-id>
coline sheets agent-column fill -w acme --json '{"sheetId":"<sheet-id>","fieldId":"<field-id>","tableId":"<table-id>"}' --fields id
```

## sheets automations create

When a row is added or a cell changes (optionally only when conditions match), set, clear, stamp or copy cells, or add a row.

Set trigger, conditions, actions with --json '\{…}' or --input.

```text
coline sheets automations create [flags]
```

**Action** `sheets.automations.create` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                       | What it does                                            |
| -------------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`          | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>`          | Required.                                               |
| `--name <text>`            | Required.                                               |
| `--enabled`                |                                                         |
| `--condition-logic <text>` | One of `and`, `or`.                                     |
| `--input <file>`           | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets automations create -w acme --sheet-id <sheet-id> --table-id <table-id> --name "…"
coline sheets automations create -w acme --json '{"sheetId":"<sheet-id>","tableId":"<table-id>","name":"…","trigger":"…","actions":"…"}' --fields id
```

## sheets automations delete

Deletes a sheet automation.

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets automations delete [flags]
```

**Action** `sheets.automations.delete` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                   | What it does                                            |
| ---------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`      | Sheet id from search, fetch or create\_sheet. Required. |
| `--automation-id <id>` | Required.                                               |
| `--input <file>`       | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets automations delete -w acme --sheet-id <sheet-id> --automation-id <automation-id> --confirm
coline sheets automations delete -w acme --json '{"sheetId":"<sheet-id>","automationId":"<automation-id>"}' --fields id --confirm
```

## sheets automations list

A sheet's automations: what triggers each and what it does.

It changes nothing.

```text
coline sheets automations list [flags]
```

**Action** `sheets.automations.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets automations list -w acme --sheet-id <sheet-id>
coline sheets automations list -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets automations update

Renames, turns on or off, or changes a sheet automation's trigger, conditions or steps.

Set trigger, conditions, actions with --json '\{…}' or --input.

```text
coline sheets automations update [flags]
```

**Action** `sheets.automations.update` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                       | What it does                                            |
| -------------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`          | Sheet id from search, fetch or create\_sheet. Required. |
| `--automation-id <id>`     | Required.                                               |
| `--name <text>`            |                                                         |
| `--enabled`                |                                                         |
| `--condition-logic <text>` | One of `and`, `or`.                                     |
| `--input <file>`           | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets automations update -w acme --sheet-id <sheet-id> --automation-id <automation-id>
coline sheets automations update -w acme --json '{"sheetId":"<sheet-id>","automationId":"<automation-id>"}' --fields id
```

## sheets columns add

Adds columns to a sheet table: a status select, a formula, a date, any typed field.

Set columns with --json '\{…}' or --input.

```text
coline sheets columns add [flags]
```

**Action** `sheets.columns.add` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>` | A table in the sheet; default: the one it opens on.     |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets columns add -w acme --sheet-id <sheet-id>
coline sheets columns add -w acme --json '{"sheetId":"<sheet-id>","columns":"…"}' --fields id
```

## sheets comments create

Adds a comment to a sheet table, row or cell, or a reply to one; mentioned people are notified.

```text
coline sheets comments create [flags]
```

**Action** `sheets.comments.create` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                          | What it does                                            |
| ----------------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`             | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>`             | Required.                                               |
| `--row-id <id>`               |                                                         |
| `--field-id <id>`             |                                                         |
| `--parent-id <id>`            |                                                         |
| `--body <text>`               | Required.                                               |
| `--mentioned-user-ids <list>` |                                                         |
| `--input <file>`              | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets comments create -w acme --sheet-id <sheet-id> --table-id <table-id> --body "…"
coline sheets comments create -w acme --json '{"sheetId":"<sheet-id>","tableId":"<table-id>","body":"…"}' --fields id
```

## sheets comments delete

Deletes the person's own comment (a sheet's owner can delete any).

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets comments delete [flags]
```

**Action** `sheets.comments.delete` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                | What it does                                            |
| ------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`   | Sheet id from search, fetch or create\_sheet. Required. |
| `--comment-id <id>` | Required.                                               |
| `--input <file>`    | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets comments delete -w acme --sheet-id <sheet-id> --comment-id <comment-id> --confirm
coline sheets comments delete -w acme --json '{"sheetId":"<sheet-id>","commentId":"<comment-id>"}' --fields id --confirm
```

## sheets comments list

Comments on a sheet, or on one row; resolved ones only when asked.

It changes nothing.

```text
coline sheets comments list [flags]
```

**Action** `sheets.comments.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag                 | What it does                                            |
| -------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`    | Sheet id from search, fetch or create\_sheet. Required. |
| `--row-id <id>`      |                                                         |
| `--include-resolved` |                                                         |
| `--input <file>`     | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets comments list -w acme --sheet-id <sheet-id>
coline sheets comments list -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets comments update

Edits the person's own comment, or resolves or reopens a thread.

```text
coline sheets comments update [flags]
```

**Action** `sheets.comments.update` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                | What it does                                            |
| ------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`   | Sheet id from search, fetch or create\_sheet. Required. |
| `--comment-id <id>` | Required.                                               |
| `--body <text>`     |                                                         |
| `--resolved`        |                                                         |
| `--input <file>`    | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets comments update -w acme --sheet-id <sheet-id> --comment-id <comment-id>
coline sheets comments update -w acme --json '{"sheetId":"<sheet-id>","commentId":"<comment-id>"}' --fields id
```

## sheets create

Creates a sheet (a tracker, list or table) with typed columns and optional rows, shown to the person as it fills. Rows are cell values keyed by column name.

Set columns, rows with --json '\{…}' or --input.

```text
coline sheets create [flags]
```

**Action** `sheets.create` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                    | What it does                                                                                                                                                                                                                                                                                         |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--title <text>`        | Default: Untitled sheet.                                                                                                                                                                                                                                                                             |
| `--template-key <text>` | A starting template, when no columns are given. One of `blank`, `project-tracker`, `content-calendar`, `crm-pipeline`, `budget-planner`, `accounting-close`, `invoice-tracker`, `subscription-metrics`, `hiring-pipeline`, `inventory-planner`, `bug-triage`, `roadmap-planner`, `customer-success`. |
| `--drive-id <id>`       | Default: the person's own drive.                                                                                                                                                                                                                                                                     |
| `--parent-id <id>`      | A folder in that drive.                                                                                                                                                                                                                                                                              |
| `--input <file>`        | Read the input as JSON from a file; - reads stdin.                                                                                                                                                                                                                                                   |

```bash
coline sheets create -w acme
coline sheets create -w acme --json '{}' --fields id
```

## sheets get

Reads a sheet's tables, columns and rows (cells keyed by column name), with row ids to update them.

It changes nothing.

```text
coline sheets get [flags]
```

**Action** `sheets.get` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag                   | What it does                                            |
| ---------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`      | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>`      | A table in the sheet; default: the one it opens on.     |
| `--row-limit <number>` |                                                         |
| `--input <file>`       | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets get -w acme --sheet-id <sheet-id>
coline sheets get -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets history

Who changed what in a sheet, newest first; for one row when a row id is given.

It changes nothing.

```text
coline sheets history [flags]
```

**Action** `sheets.history` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag                | What it does                                            |
| ------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`   | Sheet id from search, fetch or create\_sheet. Required. |
| `--row-id <id>`     |                                                         |
| `--before <number>` |                                                         |
| `--limit <number>`  |                                                         |
| `--input <file>`    | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets history -w acme --sheet-id <sheet-id>
coline sheets history -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets list

Lists the sheets the person can open in this workspace, newest first.

It changes nothing.

```text
coline sheets list [flags]
```

**Action** `sheets.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag             | What it does                                       |
| ---------------- | -------------------------------------------------- |
| `--input <file>` | Read the input as JSON from a file; - reads stdin. |

```bash
coline sheets list -w acme
coline sheets list -w acme --json '{}' --fields id
```

## sheets open

A sheet's workbook as Coline's editor opens it: its tables, fields and views, and the person's role. Rows come from the row pages.

It changes nothing.

```text
coline sheets open [flags]
```

**Action** `sheets.open` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets open -w acme --sheet-id <sheet-id>
coline sheets open -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets permissions get

The roles set on a sheet (they narrow Drive access, never widen it) and the person's own role.

It changes nothing.

```text
coline sheets permissions get [flags]
```

**Action** `sheets.permissions.get` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets permissions get -w acme --sheet-id <sheet-id>
coline sheets permissions get -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets permissions remove

Removes a role from a sheet, so Drive access applies again.

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets permissions remove [flags]
```

**Action** `sheets.permissions.remove` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--grant-id <id>` | Required.                                               |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets permissions remove -w acme --sheet-id <sheet-id> --grant-id <grant-id> --confirm
coline sheets permissions remove -w acme --json '{"sheetId":"<sheet-id>","grantId":"<grant-id>"}' --fields id --confirm
```

## sheets permissions set

Sets someone's role on a sheet, or everyone's in the workspace. Only the sheet's owner can.

```text
coline sheets permissions set [flags]
```

**Action** `sheets.permissions.set` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                     | What it does                                               |
| ------------------------ | ---------------------------------------------------------- |
| `--sheet-id <id>`        | Sheet id from search, fetch or create\_sheet. Required.    |
| `--subject-type <text>`  | Required. One of `user`, `workspace`.                      |
| `--subject-user-id <id>` |                                                            |
| `--role <text>`          | Required. One of `owner`, `editor`, `commenter`, `viewer`. |
| `--input <file>`         | Read the input as JSON from a file; - reads stdin.         |

```bash
coline sheets permissions set -w acme --sheet-id <sheet-id> --subject-type user --role owner
coline sheets permissions set -w acme --json '{"sheetId":"<sheet-id>","subjectType":"user","role":"owner"}' --fields id
```

## sheets protections create

Locks columns or rows of a table (or warns before edits), except for the people allowed. Only the sheet's owner can.

```text
coline sheets protections create [flags]
```

**Action** `sheets.protections.create` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                      | What it does                                            |
| ------------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`         | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>`         | Required.                                               |
| `--name <text>`           | Required.                                               |
| `--description <text>`    |                                                         |
| `--field-ids <list>`      |                                                         |
| `--row-ids <list>`        |                                                         |
| `--allow-user-ids <list>` |                                                         |
| `--mode <text>`           | One of `readonly`, `warning`.                           |
| `--input <file>`          | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets protections create -w acme --sheet-id <sheet-id> --table-id <table-id> --name "…"
coline sheets protections create -w acme --json '{"sheetId":"<sheet-id>","tableId":"<table-id>","name":"…"}' --fields id
```

## sheets protections delete

Removes a protected range.

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets protections delete [flags]
```

**Action** `sheets.protections.delete` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                   | What it does                                            |
| ---------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`      | Sheet id from search, fetch or create\_sheet. Required. |
| `--protection-id <id>` | Required.                                               |
| `--input <file>`       | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets protections delete -w acme --sheet-id <sheet-id> --protection-id <protection-id> --confirm
coline sheets protections delete -w acme --json '{"sheetId":"<sheet-id>","protectionId":"<protection-id>"}' --fields id --confirm
```

## sheets protections list

A sheet's protected columns and rows, and who may still edit them.

It changes nothing.

```text
coline sheets protections list [flags]
```

**Action** `sheets.protections.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets protections list -w acme --sheet-id <sheet-id>
coline sheets protections list -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets protections update

Changes a protected range's name, cells, mode or allowed people.

```text
coline sheets protections update [flags]
```

**Action** `sheets.protections.update` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                      | What it does                                            |
| ------------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`         | Sheet id from search, fetch or create\_sheet. Required. |
| `--protection-id <id>`    | Required.                                               |
| `--name <text>`           |                                                         |
| `--description <text>`    |                                                         |
| `--field-ids <list>`      |                                                         |
| `--row-ids <list>`        |                                                         |
| `--allow-user-ids <list>` |                                                         |
| `--mode <text>`           | One of `readonly`, `warning`.                           |
| `--input <file>`          | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets protections update -w acme --sheet-id <sheet-id> --protection-id <protection-id>
coline sheets protections update -w acme --json '{"sheetId":"<sheet-id>","protectionId":"<protection-id>"}' --fields id
```

## sheets rename

Renames a sheet the person can edit.

```text
coline sheets rename [flags]
```

**Action** `sheets.rename` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--title <text>`  | Required.                                               |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets rename -w acme --sheet-id <sheet-id> --title "…"
coline sheets rename -w acme --json '{"sheetId":"<sheet-id>","title":"…"}' --fields id
```

## sheets rows page

One page of a sheet table's rows, for the sheet editor in the chat.

It changes nothing.

```text
coline sheets rows page [flags]
```

**Action** `sheets.rows.page` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag               | What it does                                            |
| ------------------ | ------------------------------------------------------- |
| `--sheet-id <id>`  | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>`  | Required.                                               |
| `--after <text>`   |                                                         |
| `--limit <number>` |                                                         |
| `--input <file>`   | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets rows page -w acme --sheet-id <sheet-id> --table-id <table-id>
coline sheets rows page -w acme --json '{"sheetId":"<sheet-id>","tableId":"<table-id>"}' --fields id
```

## sheets rows update

Adds, updates or deletes rows in a sheet table. Adds and updates take cell values keyed by column name; updates and deletes take row ids from read\_sheet.

It removes or overwrites something, so it runs only with --confirm.

Set addRows, updateRows with --json '\{…}' or --input.

```text
coline sheets rows update [flags]
```

**Action** `sheets.rows.update` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                      | What it does                                            |
| ------------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`         | Sheet id from search, fetch or create\_sheet. Required. |
| `--table-id <id>`         | A table in the sheet; default: the one it opens on.     |
| `--delete-row-ids <list>` |                                                         |
| `--input <file>`          | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets rows update -w acme --sheet-id <sheet-id> --confirm
coline sheets rows update -w acme --json '{"sheetId":"<sheet-id>"}' --fields id --confirm
```

## sheets snapshots create

Saves the whole sheet as a named version to compare with or restore later.

```text
coline sheets snapshots create [flags]
```

**Action** `sheets.snapshots.create` · **Effect** write · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--name <text>`   | Required.                                               |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets snapshots create -w acme --sheet-id <sheet-id> --name "…"
coline sheets snapshots create -w acme --json '{"sheetId":"<sheet-id>","name":"…"}' --fields id
```

## sheets snapshots delete

Deletes a saved snapshot.

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets snapshots delete [flags]
```

**Action** `sheets.snapshots.delete` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                 | What it does                                            |
| -------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`    | Sheet id from search, fetch or create\_sheet. Required. |
| `--snapshot-id <id>` | Required.                                               |
| `--input <file>`     | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets snapshots delete -w acme --sheet-id <sheet-id> --snapshot-id <snapshot-id> --confirm
coline sheets snapshots delete -w acme --json '{"sheetId":"<sheet-id>","snapshotId":"<snapshot-id>"}' --fields id --confirm
```

## sheets snapshots diff

What changed in a sheet since a saved snapshot.

It changes nothing.

```text
coline sheets snapshots diff [flags]
```

**Action** `sheets.snapshots.diff` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag                 | What it does                                            |
| -------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`    | Sheet id from search, fetch or create\_sheet. Required. |
| `--snapshot-id <id>` | Required.                                               |
| `--input <file>`     | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets snapshots diff -w acme --sheet-id <sheet-id> --snapshot-id <snapshot-id>
coline sheets snapshots diff -w acme --json '{"sheetId":"<sheet-id>","snapshotId":"<snapshot-id>"}' --fields id
```

## sheets snapshots list

A sheet's saved versions.

It changes nothing.

```text
coline sheets snapshots list [flags]
```

**Action** `sheets.snapshots.list` · **Effect** read, changes nothing · **Can wait for your approval** no · **Scope** `files.read` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets snapshots list -w acme --sheet-id <sheet-id>
coline sheets snapshots list -w acme --json '{"sheetId":"<sheet-id>"}' --fields id
```

## sheets snapshots restore

Puts a sheet back to a saved snapshot. The current state is kept in history.

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets snapshots restore [flags]
```

**Action** `sheets.snapshots.restore` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag                 | What it does                                            |
| -------------------- | ------------------------------------------------------- |
| `--sheet-id <id>`    | Sheet id from search, fetch or create\_sheet. Required. |
| `--snapshot-id <id>` | Required.                                               |
| `--input <file>`     | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets snapshots restore -w acme --sheet-id <sheet-id> --snapshot-id <snapshot-id> --confirm
coline sheets snapshots restore -w acme --json '{"sheetId":"<sheet-id>","snapshotId":"<snapshot-id>"}' --fields id --confirm
```

## sheets trash

Moves a sheet the person can edit to trash, where it can be restored.

It removes or overwrites something, so it runs only with --confirm.

```text
coline sheets trash [flags]
```

**Action** `sheets.trash` · **Effect** destructive, runs only with `--confirm` · **Can wait for your approval** no · **Scope** `files.write` · **Workspace** yes, `-w`

| Flag              | What it does                                            |
| ----------------- | ------------------------------------------------------- |
| `--sheet-id <id>` | Sheet id from search, fetch or create\_sheet. Required. |
| `--input <file>`  | Read the input as JSON from a file; - reads stdin.      |

```bash
coline sheets trash -w acme --sheet-id <sheet-id> --confirm
coline sheets trash -w acme --json '{"sheetId":"<sheet-id>"}' --fields id --confirm
```
