---
title: "Clears values from a specified range in a Google Sheet."
method: POST
path: "/clearValues"
---

# Clears values from a specified range in a Google Sheet.

`POST /clearValues`

This function clears all values from a specified range in a Google Sheet. It takes a single input object containing the sheet ID and the range in A1 notation. The function returns a promise that resolves to an object with information about the clear operation.

## Request body

- object
  - `body` object — Body of the clearValues sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'oauth2' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/google-sheets

## Response `200`

Successful operation

- object
  - `spreadsheetId` string — The ID of the spreadsheet
  - `clearedRange` string — The range that was cleared
  - `clearedRows` integer — The number of rows that were cleared
  - `clearedColumns` integer — The number of columns that were cleared

## Other responses

- `400` — Bad Request - Invalid input parameters
- `403` — Forbidden - Insufficient permissions to access the sheet
- `404` — Not Found - Sheet or range not found
- `500` — Internal Server Error

## Changes

- **2025-05-29** `470b95f73df9` — 1 warning, 4 info
  - removed the optional property `updatedCells` from the response with the `200` status
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - added the optional property `clearedColumns` to the response with the `200` status
  - …1 more
- **2025-05-28** `77260ff78232` — 2 warning, 3 info
  - removed the optional property `clearedColumns` from the response with the `200` status
  - removed the optional property `clearedRows` from the response with the `200` status
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `404`
  - …1 more

[Change history](https://skmtc.dev/microfox-ai/apis/google-sheets-sdk-api/changes/clearValues/post.md)

---

[API](https://skmtc.dev/microfox-ai/apis/google-sheets-sdk-api.md) · [All operations](https://skmtc.dev/microfox-ai/apis/google-sheets-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/microfox-ai/google-sheets-sdk-api/revisions/85db428f2808/schema)
