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

# Create spreadsheet

> Create a Google spreadsheet with optional initial sheets and settings.

`createSpreadsheet` creates a new workbook owned by the connected account.

## Example

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

export default automation("Create an operations workbook", () => {
  onHttpRequest({ scope: "automation" })

  createSpreadsheet({
    title: "Operations",
    locale: "en_US",
    timeZone: "America/Los_Angeles",
    sheets: [{ title: "Orders", frozenRowCount: 1 }],
  })
})
```

## Inputs

`title` is required. Optional `locale`, IANA `timeZone`, and `autoRecalc`
(`onChange`, `minutely`, `hourly`) set spreadsheet properties. `sheets` is a
non-empty array of initial sheet definitions with `title` and optional
`rowCount`, `columnCount`, frozen counts, and `hidden`. Omit it for Google's
default sheet. `account` selects the Google account.

## Output

Returns the complete created `Spreadsheet`; see [Get spreadsheet](/reference/integrations/google-sheets/actions/get-spreadsheet#output). Keep `spreadsheetId` or `url` for later actions.
