sheets.spreadsheets.sheets.copyTo
Copies a single sheet from one spreadsheet into another and returns the new sheet's properties. Use it to duplicate tabs across files by providing the source spreadsheet, sheet ID, and destination ID.
Instructions
Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON CopySheetToAnotherSpreadsheetRequest object accepting destinationSpreadsheetId; pass it via params or whole via body_file
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| sheetId | Yes | [URL path segment] The ID of the sheet to copy. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON CopySheetToAnotherSpreadsheetRequest object. | |
| request_body | No | Request body of type CopySheetToAnotherSpreadsheetRequest: pass it via `params` (merged into the built body) or whole via `body_file`. | |
| spreadsheetId | Yes | [URL path segment] The ID of the spreadsheet containing the sheet to copy. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | ||
| title | No | ||
| hidden | No | ||
| sheetId | No | ||
| tabColor | No | ||
| sheetType | No | ||
| rightToLeft | No | ||
| tabColorStyle | No | ||
| gridProperties | No | ||
| dataSourceSheetProperties | No |