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

# spreadsheets_values_batch_update

> Sets values in one or more ranges of a spreadsheet.

<div className="tool-route"><span className="tool-row-method" data-method="POST">POST</span><code>{"https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values:batchUpdate"}</code></div>

```python gsheets_spreadsheets_values_batch_update.py theme={null}
from charter.packs import gsheets

result = await gsheets.spreadsheets_values_batch_update.ainvoke({"spreadsheetId": ..., "valueInputOption": ..., "data": ...})
```

<Note>
  Requires `https://www.googleapis.com/auth/spreadsheets`. Costs 1 against the provider's own quota.
</Note>

## Path parameters

<div className="reference-table">
  | Field                                                                 | Type     | Description                          |
  | --------------------------------------------------------------------- | -------- | ------------------------------------ |
  | `spreadsheetId` <span className="required" title="required">\*</span> | `string` | The ID of the spreadsheet to update. |
</div>

## Body

<div className="reference-table">
  | Field                                                                    | Type                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `valueInputOption` <span className="required" title="required">\*</span> | [ValueInputOption](/charter/charter/packs/gsheets/values/objects#valueinputoption)         | How the input data should be interpreted.                                                                                                                                                                                                                                                                                                                                                                                             |
  | `data` <span className="required" title="required">\*</span>             | [ValueRange](/charter/charter/packs/gsheets/values/objects#valuerange)\[]                  | The new values to apply to the spreadsheet. <span className="field-constraints">min 1 items</span>                                                                                                                                                                                                                                                                                                                                    |
  | `includeValuesInResponse`                                                | `boolean`                                                                          | Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The updatedData field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns). |
  | `responseValueRenderOption`                                              | [ValueRenderOption](/charter/charter/packs/gsheets/values/objects#valuerenderoption)       | Determines how values in the response should be rendered. The default render option is FORMATTED\_VALUE.                                                                                                                                                                                                                                                                                                                              |
  | `responseDateTimeRenderOption`                                           | [DateTimeRenderOption](/charter/charter/packs/gsheets/values/objects#datetimerenderoption) | Determines how dates, times, and durations in the response should be rendered. This is ignored if responseValueRenderOption is FORMATTED\_VALUE. The default dateTime render option is SERIAL\_NUMBER.                                                                                                                                                                                                                                |
</div>
