func (sc *SheetsClient) CreateSheet(title string, sheetTitles []string) (*sheets.Spreadsheet, error) {
	s := &sheets.Spreadsheet{
		Properties: &sheets.SpreadsheetProperties{
			Title:      title,
			TimeZone:   "America/Los_Angeles",
			AutoRecalc: "ON_CHANGE",
		},
	}
	if len(sheetTitles) > 0 {
		sheetArray := make([]*sheets.Sheet, 0)
		for _, sheetTitle := range sheetTitles {
			sheetArray = append(sheetArray, &sheets.Sheet{Properties: &sheets.SheetProperties{Title: sheetTitle}})
		}
		s.Sheets = sheetArray
	}
	sheet, err := sc.service.Spreadsheets.Create(s).Do()
	if err != nil {
		return nil, err
	}
	sc.sheetID = sheet.SpreadsheetId
	return sheet, err
}
CreateSheet creates a new spreadsheet and configures the client to point to it.
package core
import (
	"context"
	"github.com/apigee/registry/cmd/registry/googleauth"
	"google.golang.org/api/option"
	"google.golang.org/api/sheets/v4"
)
type SheetsClient struct {
	sheetID string
	service *sheets.Service
}
func NewSheetsClient(ctx context.Context, id string) (*SheetsClient, error) {
	httpClient, err := googleauth.GetAuthenticatedClient(ctx)
	if err != nil {
		return nil, err
	}
	sheetsClient := &SheetsClient{sheetID: id}
	sheetsClient.service, err = sheets.NewService(ctx, option.WithHTTPClient(httpClient))
	return sheetsClient, err
}