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

> Sets values in a range of a spreadsheet.

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

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

result = await gsheets.spreadsheets_values_update.ainvoke({"spreadsheetId": ..., "range": ..., "valueInputOption": ..., "valueRange": ...})
```

<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.     |
  | `range` <span className="required" title="required">\*</span>         | `string` | The A1 notation of the values to update. |
</div>

## Query parameters

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

## Body

<div className="reference-table">
  | Field                                                              | Type                                                           | Description                                          |
  | ------------------------------------------------------------------ | -------------------------------------------------------------- | ---------------------------------------------------- |
  | `valueRange` <span className="required" title="required">\*</span> | [ValueRange](/charter/charter/packs/gsheets/values/objects#valuerange) | The request body contains an instance of ValueRange. |
</div>
