GSheets Operator > Google Sheets Operator > Duplicate Sheet

Duplicate Sheet

Copies a sheet tab from your spreadsheet to a new sheet tab in the same spreadsheet, effectively duplicating the source sheet tab.
It's recommended to refresh your spreadsheet ref after doing this.

Inputs

In
Exec

In Token
Google Sheets Web Token Object Reference

A validated UGoogleSheetsWebToken object. Used to authenticate the Sheets operation.

Operation Params
Google Sheets Operation Params Structure

Generic request operation parameters

Call on Complete
Delegate (by ref)

This delegate will be called when the operation completes and tell you whether or not it was successful and return the response as a string.

In Spreadsheet Id
String

This is the spreadsheet ID number or key. It will be copied from and to this same spreadsheet. Get it from your spreadsheet URL by calling GetSpreadsheetIdFromUrl.

In Source Sheet Id
Integer

This is the sheet ID number or GID of the source sheet you wish to duplicate. Get it from your sheet URL by calling GetSheetIdFromUrl or from a UGoogleSheetsObjectSpreadsheet calling GetSheetIdFromSheetIndex().

In New Sheet Title
String

The name of the new sheet. If empty, a new name is chosen for you.

In New Sheet Id
Integer

If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative.

Desired Insertion Index
Integer

The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented.

Outputs

Out
Exec