-1

I'm trying to find a value exist in the GSheet. Connection to Google sheet works. I can fetch all the worksheets within the files, but I can't some reason iterable the list of worksheets. Here is the file looks likes: enter image description here I'm trying to find cell value and then fetch the values within that column.

Sample Code:

#Gsheet setup w/ key.json token
scope = ['https://www.googleapis.com/auth/drive.file','https://www.googleapis.com/auth/spreadsheets','https://www.googleapis.com/auth/drive']
credentials = ServiceAccountCredentials.from_json_keyfile_name('gdoc.json',scope)
gc = gspread.authorize(credentials
sheet = gc.open("GSHEET_Search_test")
cell = sheet.find("B02")
print(cell)

Getting errors:

miu
  • 189
  • 2
  • 13
  • Can I ask you about your question? 1. I cannot understand about `I can't some reason iterable the list of worksheets.`. Can I ask you about the detail of it? 2. Can you provide the detail of `Getting errors:`? 3. Can I ask you about the detail of your goal? By these information, I would like to try to understand about your question. – Tanaike Nov 14 '20 at 00:53
  • sorry for not providing the details, but I was able to iterate over the worksheet index value rather then the list of worksheet was outputed. Thank you – miu Nov 15 '20 at 07:28
  • Thank you for replying. I'm glad your issue was resolved. – Tanaike Nov 15 '20 at 22:09

1 Answers1

0

I was able to iterate over the worksheet index value worksheet = sheet.get_worksheet(counter)

miu
  • 189
  • 2
  • 13