gspread

Using gspread with proxy

可紊 提交于 2021-01-27 04:20:09
问题 I am trying to access google spreadsheets through gspread api in python. I have imported gspread . I am getting socket. error: [Errno 10061] No connection could be made because the target machine actively refused it at gc = gspread.login('pan*******@gmail.com', '********') Here is my code: import urllib2 import urllib import gspread from PIL import Image from PIL import ImageDraw from PIL import ImageFont w = 420 gc = gspread.login('pan******@gmail.com', '*******') wks = gc.open("Spreadsheet"

How can I reset the color of a Google Sheet through the API

老子叫甜甜 提交于 2021-01-07 02:49:38
问题 Building off of this question about setting a color, I wonder how to reset/clear the color of a Google Sheet's tab. For reference, here is how to set a color sheet = open_worksheet() # does all the auth/credential work new_tab = sheet.worksheet('DemoTab') body = { "requests": [ { "updateSheetProperties": { "properties": { "sheetId": new_tab.id, "tabColor": { "red": 1.0, "green": 0.3, "blue": 0.4 } }, "fields": "tabColor" } } ] } try: res = sheet.batch_update(body) pprint(res) except gspread

How can I reset the color of a Google Sheet through the API

有些话、适合烂在心里 提交于 2021-01-07 02:49:32
问题 Building off of this question about setting a color, I wonder how to reset/clear the color of a Google Sheet's tab. For reference, here is how to set a color sheet = open_worksheet() # does all the auth/credential work new_tab = sheet.worksheet('DemoTab') body = { "requests": [ { "updateSheetProperties": { "properties": { "sheetId": new_tab.id, "tabColor": { "red": 1.0, "green": 0.3, "blue": 0.4 } }, "fields": "tabColor" } } ] } try: res = sheet.batch_update(body) pprint(res) except gspread