0

How to access a spreadsheet document in python from Google Sheets using Sheets API ? I was trying to access a document in my google account. So Will API key be sufficient or should we go with Oauth2client?

2 Answers 2

1

You can just use the OAuth2 flow. The credentials will be stored in your client_secret.json. This procedure is detailed in the Python Quickstart Sheets API guide.

Step 1: Turn on the Google Sheets API

Step 2: Install the Google Client Library

Step 3: Set up the sample

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

Comments

1

You can try using the library Gspread for accessing google spreadsheets. You can install gspread using the command

pip install gspread

or

pip install https://github.com/burnash/gspread/archive/master.zip

I have written a detailed blog on how to access google sheets in python using gspread. This might help you.

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.