Sets values in one or more cell ranges of the sheet at once. :param list data: List of dictionaries in the form of `{'range': '...', 'values': [[.., ..], ...]}` where `range` is a target range to update in A1 notation or a named range, and `values` is a l
(
self,
data: Iterable[MutableMapping[str, Any]],
raw: bool = True,
value_input_option: Optional[ValueInputOption] = None,
include_values_in_response: Optional[bool] = None,
response_value_render_option: Optional[ValueRenderOption] = None,
response_date_time_render_option: Optional[DateTimeOption] = None,
)
| 1253 | return response |
| 1254 | |
| 1255 | def batch_update( |
| 1256 | self, |
| 1257 | data: Iterable[MutableMapping[str, Any]], |
| 1258 | raw: bool = True, |
| 1259 | value_input_option: Optional[ValueInputOption] = None, |
| 1260 | include_values_in_response: Optional[bool] = None, |
| 1261 | response_value_render_option: Optional[ValueRenderOption] = None, |
| 1262 | response_date_time_render_option: Optional[DateTimeOption] = None, |
| 1263 | ) -> JSONResponse: |
| 1264 | """Sets values in one or more cell ranges of the sheet at once. |
| 1265 | |
| 1266 | :param list data: List of dictionaries in the form of |
| 1267 | `{'range': '...', 'values': [[.., ..], ...]}` where `range` |
| 1268 | is a target range to update in A1 notation or a named range, |
| 1269 | and `values` is a list of lists containing new values. |
| 1270 | |
| 1271 | :param str value_input_option: (optional) How the input data should be |
| 1272 | interpreted. Possible values are: |
| 1273 | |
| 1274 | * ``ValueInputOption.raw`` |
| 1275 | |
| 1276 | The values the user has entered will not be parsed and will be |
| 1277 | stored as-is. |
| 1278 | |
| 1279 | * ``ValueInputOption.user_entered`` |
| 1280 | |
| 1281 | The values will be parsed as if the user typed them into the |
| 1282 | UI. Numbers will stay as numbers, but strings may be converted |
| 1283 | to numbers, dates, etc. following the same rules that are |
| 1284 | applied when entering text into a cell via |
| 1285 | the Google Sheets UI. |
| 1286 | |
| 1287 | :type value_input_option: :class:`~gspread.utils.ValueInputOption` |
| 1288 | |
| 1289 | :param response_value_render_option: (optional) Determines how values should |
| 1290 | be rendered in the output. See `ValueRenderOption`_ in |
| 1291 | the Sheets API. |
| 1292 | |
| 1293 | Possible values are: |
| 1294 | |
| 1295 | ``ValueRenderOption.formatted`` |
| 1296 | (default) Values will be calculated and formatted according |
| 1297 | to the cell's formatting. Formatting is based on the |
| 1298 | spreadsheet's locale, not the requesting user's locale. |
| 1299 | |
| 1300 | ``ValueRenderOption.unformatted`` |
| 1301 | Values will be calculated, but not formatted in the reply. |
| 1302 | For example, if A1 is 1.23 and A2 is =A1 and formatted as |
| 1303 | currency, then A2 would return the number 1.23. |
| 1304 | |
| 1305 | ``ValueRenderOption.formula`` |
| 1306 | Values will not be calculated. The reply will include |
| 1307 | the formulas. For example, if A1 is 1.23 and A2 is =A1 and |
| 1308 | formatted as currency, then A2 would return "=A1". |
| 1309 | |
| 1310 | .. _ValueRenderOption: https://developers.google.com/sheets/api/reference/rest/v4/ValueRenderOption |
| 1311 | |
| 1312 | :type response_value_render_option: :class:`~gspread.utils.ValueRenderOption` |