Документы · Изменение
Таблицы · Ячейки · Изменение
sheets_cells_update
Попробуйте три запроса
Подготовить
- Вы указываетеSheetid
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Таблицы / Ячейки / Изменение». Для изменения нужны ID записи, sheetId. Покажи объект и ожидаемый эффект до выполнения.
- id
- Id записи
- sheetId
- Параметр
- cells
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Таблицы / Ячейки / Изменение» с параметром id = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- id
- DEMO-101
- sheetId
- DEMO-101
- expectedRevision
- 4
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Таблицы / Ячейки / Изменение» по исходному ответу. Покажи результат. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Set or clear up to 1000 native cells atomically within a workbook version. Supports values, formulas, rich cell formatting, validation and inline images using canonical cell fields. Preserves all other cells.
Параметры запроса
- id
- Идентификатор выбранной записи. обязательно по схеме · string
- expectedRevision
- Версия, прочитанная перед изменением. обязательно по схеме · integer · максимум 9007199254740991
- sheetId
- Native sheetId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- cells
- Native cells value; use the value and type returned by the corresponding service. обязательно по схеме · array · до элементов 1000
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- result
- Bounded native Sheets result. Native revisions and merge rules are authoritative. обязательно по схеме · object
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native id value; use the value and type returned by the corresponding service."
},
"expectedRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Native expectedRevision value; use the value and type returned by the corresponding service."
},
"sheetId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
"description": "Native sheetId value; use the value and type returned by the corresponding service."
},
"cells": {
"minItems": 1,
"maxItems": 1000,
"type": "array",
"items": {
"type": "object",
"properties": {
"row": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Native row value; use the value and type returned by the corresponding service."
},
"col": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Native col value; use the value and type returned by the corresponding service."
},
"cell": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "null"
}
],
"description": "Complete native cell object from get, e.g. {v:42} or {v:\"=SUM(A1:A3)\"}; null clears the cell. Supply existing formatting when replacing a cell."
}
},
"required": [
"row",
"col",
"cell"
],
"additionalProperties": false
},
"description": "Native cells value; use the value and type returned by the corresponding service."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable request ID for these exact arguments. Keep it if the response is uncertain."
}
},
"required": [
"id",
"expectedRevision",
"sheetId",
"cells",
"requestId"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
}
}
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"result": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
},
"description": "Bounded native Sheets result. Native revisions and merge rules are authoritative."
}
},
"required": [
"result"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/$defs/__schema0"
}
}
]
}
}
}