modify_sheet_values
Update, write, or clear values in a specified range of Google Sheets. Requires user email, spreadsheet ID, and range details. Supports "RAW" or "USER_ENTERED" input options.
Instructions
Modifies values in a specific range of a Google Sheet - can write, update, or clear values.
Args:
user_google_email (str): The user's Google email address. Required.
spreadsheet_id (str): The ID of the spreadsheet. Required.
range_name (str): The range to modify (e.g., "Sheet1!A1:D10", "A1:D10"). Required.
values (Optional[List[List[str]]]): 2D array of values to write/update. Required unless clear_values=True.
value_input_option (str): How to interpret input values ("RAW" or "USER_ENTERED"). Defaults to "USER_ENTERED".
clear_values (bool): If True, clears the range instead of writing values. Defaults to False.
Returns:
str: Confirmation message of the successful modification operation.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
clear_values | No | ||
range_name | Yes | ||
service | Yes | ||
spreadsheet_id | Yes | ||
user_google_email | Yes | ||
value_input_option | No | USER_ENTERED | |
values | No |
Input Schema (JSON Schema)
{
"properties": {
"clear_values": {
"default": false,
"title": "Clear Values",
"type": "boolean"
},
"range_name": {
"title": "Range Name",
"type": "string"
},
"service": {
"title": "service",
"type": "string"
},
"spreadsheet_id": {
"title": "Spreadsheet Id",
"type": "string"
},
"user_google_email": {
"title": "User Google Email",
"type": "string"
},
"value_input_option": {
"default": "USER_ENTERED",
"title": "Value Input Option",
"type": "string"
},
"values": {
"anyOf": [
{
"items": {
"items": {
"type": "string"
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Values"
}
},
"required": [
"service",
"user_google_email",
"spreadsheet_id",
"range_name"
],
"title": "modify_sheet_valuesArguments",
"type": "object"
}