Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.
HTTP request
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
spreadsheetId |
The ID of the spreadsheet containing the sheet to copy. |
sheetId |
The ID of the sheet to copy. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "destinationSpreadsheetId": string } |
Fields | |
---|---|
destinationSpreadsheetId |
The ID of the spreadsheet to copy the sheet to. |
Response body
If successful, the response body contains an instance of SheetProperties
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
For more information, see the Authorization guide.