# Authorize Spreadsheet Access
gc = pygsheets.authorize(service_file=gServiceAccAuthFile, retries=1)
# Open spreadsheet
sh = gc.open_by_key(gSheetKey)
# Open Worksheet
wks = sh.worksheet_by_title(gWorksheetName)
mydict = wks.get_values('A1','A55',returnas='cell')
print(mydict[5])
[<Cell A6 'MY CELL CONTENTS'>]
我想知道这种数据类型是什么,以及如何使用单独的值(Cell A6
(或只是A6
)和MY CELL CONTENTS
)。
我试过print(mydict[5][0])
了,但这只是返回:
<Cell A6 'MY CELL CONTENTS'>