1

So I have Python basically connected to google sheets at the moment. It can access the first sheet and read and write data:

sheet = client.open("Remake").sheet1

I can access sheet 1 inside the overarching spreadsheet, but I cannot access the second sheet (sheet2) by just changing it to:

sheet = client.open("Remake").sheet2
1
  • Kindly accept my answer if this is helpful. Thanks :) Commented May 30, 2019 at 14:41

2 Answers 2

4

To explain this, it is because Google Spreadsheet only implemented sheet1 to let you retrieve the first sheet in your spreadsheet as a shortcut. So if you want to retrieve other sheets, you need to use other methods like:

wks = gc.open("doc_name").get_worksheet(index)

or

wks = gc.open("doc_name").worksheet(title)

Related infos:

Sign up to request clarification or add additional context in comments.

Comments

0

In my case this code working (python 3.7)

Spreadsheet  = client.open("sheet_name").worksheet("sheet_title")

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.