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

# Clear values

> Clear values from one or more Google Sheets ranges without changing formatting.

`clearValues` removes cell contents while preserving formatting, validation,
comments, and other cell properties.

## Example

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

export default automation("Clear staging data", () => {
  onHttpRequest({ scope: "automation" })

  clearValues({
    spreadsheet: "spreadsheet-id",
    ranges: ["Staging!A2:Z", "LastImport"],
  })
})
```

## Inputs

`spreadsheet` and one A1/named range or non-empty `ranges` array are required.
`account` selects the Google account.

## Output

Returns `{ spreadsheetId: string; clearedRanges: string[] }`; Google bounds
unbounded input ranges to the actual cleared grid. This does not delete or
shift rows.
