From: Carl Worth Date: Tue, 29 Sep 2020 22:12:24 +0000 (-0700) Subject: Set the name of newly-created sheets to match the channel name X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=69ac593440ed9cb320ffcd7d10b2c2c75dceb819;p=turbot Set the name of newly-created sheets to match the channel name Much better than having dozens of sheets all named "untitled". --- diff --git a/turbot/sheets.py b/turbot/sheets.py index 50c4722..3d52735 100644 --- a/turbot/sheets.py +++ b/turbot/sheets.py @@ -35,7 +35,11 @@ def sheets_create(name): service = build('sheets', 'v4', credentials=creds) # Create a new sheet - spreadsheet_body = {} + spreadsheet_body = { + 'properties': { + 'title': name + } + } request = service.spreadsheets().create(body=spreadsheet_body) response = request.execute()