> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Delete rows

> Delete explicitly numbered rows from a Google sheet or native table.

`deleteRows` removes rows and shifts following rows upward. It groups adjacent
targets and deletes from bottom to top so row shifting cannot change later
targets.

## Example

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { deleteRows } from "automate.ax/google-sheets"

export default automation("Delete obsolete orders", () => {
  onHttpRequest({ scope: "automation" })

  deleteRows({
    spreadsheet: "spreadsheet-id",
    source: { sheet: "Orders" },
    rowNumbers: [12, 18, 19],
  })
})
```

## Inputs

`spreadsheet`, `source`, and one row number or an array of up to 1,000 are
required. Duplicates are removed and numbers are sorted. Every row must belong
to the source body.

`account` optionally selects the Google account binding.

## Output

Returns `{ affectedCells, rowNumbers }`, where row numbers are the original
one-based targets. Stored row numbers below a deletion can become stale because
the sheet shifts upward.
