Google Sheets: How to copy(duplicate) worksheet to same spreadsheet in Go

Verified Environment Version OS macOS 13.2.1 (22D68) Darwin 22.3.0 Go go1.20.1 darwin/arm64 What to do Note SpreadsheetsValuesService.BatchUpdate DuplicateSheetRequest Examples package main import ( "context" "log" "os" "strconv" "time" "google.golang.org/api/option" "google.golang.org/api/sheets/v4" ) func newSheetsClient(ctx context.Context, credentials string) (*sheets.Service, error) { var svc *sheets.Service var err error if credentials == "" { // You may need to run the following commands beforehand: // gcloud auth application-default login --scopes "https://www.googleapis.com/auth/spreadsheets" svc, err = sheets....

March 5, 2023