Method: spreadsheets.sheets.copyTo
Копирует один лист из электронной таблицы в другую электронную таблицу. Возвращает свойства вновь созданного листа.
HTTP-запрос
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo
URL-адрес использует синтаксис транскодирования gRPC .
Параметры пути
Параметры |
---|
spreadsheetId | string Идентификатор электронной таблицы, содержащей лист для копирования. |
sheetId | integer Идентификатор листа для копирования. |
Тело запроса
Тело запроса содержит данные следующей структуры:
JSON-представление |
---|
{
"destinationSpreadsheetId": string
} |
Поля |
---|
destinationSpreadsheetId | string Идентификатор электронной таблицы, в которую необходимо скопировать лист. |
Тело ответа
В случае успеха тело ответа содержит экземпляр SheetProperties
.
Области авторизации
Требуется одна из следующих областей OAuth:
-
https://www.googleapis.com/auth/drive
-
https://www.googleapis.com/auth/drive.file
-
https://www.googleapis.com/auth/spreadsheets
Дополнительную информацию см. в руководстве по авторизации .
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-10-25 UTC.
[null,null,["Последнее обновление: 2024-10-25 UTC."],[[["Copies a single sheet from one Google Spreadsheet to another, returning the properties of the new sheet."],["Requires specifying the source spreadsheet and sheet IDs, along with the destination spreadsheet ID."],["Utilizes an HTTP POST request to `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo`."],["Needs authorization with specific OAuth scopes like `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/spreadsheets`."]]],["This content describes how to copy a sheet from one spreadsheet to another using an HTTP POST request to the Google Sheets API. The request URL requires the source `spreadsheetId` and `sheetId`. The request body needs a `destinationSpreadsheetId`. Upon success, the API returns the new sheet's properties. Authorization requires one of three specific OAuth scopes: `drive`, `drive.file`, or `spreadsheets`. The `try it!` section is a resource to help understand how the API works.\n"]]