> ## 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 sheet

> Permanently delete one sheet from a Google spreadsheet.

`deleteSheet` resolves a sheet, deletes it, and returns the metadata that
identified the removed tab.

## Example

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

export default automation("Delete a staging sheet", () => {
  onHttpRequest({ scope: "automation" })

  deleteSheet({ spreadsheet: "spreadsheet-id", sheet: "Staging" })
})
```

## Inputs

`spreadsheet` and `sheet: string | number` are required. Strings match exact
titles and numbers are immutable sheet IDs. `account` selects the Google account.

## Output

Returns the deleted `Sheet` metadata. The operation permanently removes its
values, formatting, tables, charts, and other sheet-owned content; Google will
not let a spreadsheet have zero sheets.
