Questions tagged [gspread]

gspread is an asynchronous Python library for interacting with Google Spreadsheets.

gspread is a Python library for interacting with Google Spreadsheets.

949 questions
2
votes
1 answer

Using python Gspread Oauth with credentials file saved somewhere other than in the directory specified in gspread documentation

The instructions for authentication can be found here: https://gspread.readthedocs.io/en/latest/oauth2.html#for-end-users-using-oauth-client-id Step 7 in the authentication sequence says: "Move the downloaded file to…
ChungaBunga
  • 116
  • 1
  • 10
2
votes
1 answer

Get real value from a cell pointing to another cell

I'm trying to create a script to handle with a google spreadsheet, but sometimes, it happens that when I use the command val = worksheet.cell(1, 2).value, the actual value is like =M7, therefore, it doesn't have a real value for the script. Is there…
2
votes
1 answer

How can I change the color of a worksheet's tab

I have a python script that is pulling data from an external resource and adding data to a Google Sheet. For the most part I have everything working, except I'd like to change the color of a tab to signify the script status. The whole process starts…
MivaScott
  • 1,763
  • 1
  • 12
  • 30
2
votes
1 answer

How to add a json credential file of Google drive api alongwith the code when packaging the code written in python?

I wrote a function in python which uses the json file as the credential file for the Google drive API. The function takes google sheet URL as input and plots graph with the help of gspread library. If I have to make a package of that function how…
2
votes
2 answers

Q about scope value when using gspread API to read google sheet with Python

I am new to google apis. I am looking to read a google spreadsheet via a python program and following instructions found here: https://www.twilio.com/blog/2017/02/an-easy-way-to-read-and-write-to-a-google-spreadsheet-in-python.html I have a google…
SuB
  • 25
  • 4
2
votes
1 answer

How to find all cells matching a regex with gspread?

So I am very new to programming and I am using python gspread module to use a google sheet as a database. There's a function for said module called sheet.findall(query, row, column), and this is great, but there's one issue, the query parameter will…
korycat
  • 23
  • 4
2
votes
1 answer

Python gspread API not appending rows if multiple functions called

I'm using the gspread module in Python to create an application involving a dynamic number of rows in the spreadsheet. Here's what the spreadsheet looks like: Whenever the user adds a new Pinterest Pin, the program is supposed to append one more…
Bhavye Mathur
  • 1,024
  • 1
  • 7
  • 25
2
votes
2 answers

How to predefined number of rows and cols within gspread

I do have a scraped data which i overwriting google sheet daily with it. The point here that I'm unable to find an option where i can set number of rows and cols for the existing google sheet. I noticed that can be done only for new created sheet…
2
votes
2 answers

google.oauth2 'No access token in response' error while trying to open spreadsheet

I'm trying to open google spreadsheet via gspread, but my code fails with error: Traceback (most recent call last): File "/home/memcpy/.local/lib/python3.6/site-packages/google/oauth2/_client.py", line 156, in jwt_grant access_token =…
strncmp
  • 21
  • 1
  • 2
2
votes
5 answers

Gspread - authentication error question - no AppData folder

I've actually found a work around for this issue, but I'm still stumped as to why it's happening. I just starting using gspread so I'm quite new. After installing via pip and downloading the credentials for the Google Sheets and Drive API, when I…
tmkeeley
  • 21
  • 1
  • 3
2
votes
3 answers

How do I insert images into a Google Sheet in Python using gspread (or any other package)?

I need a way to insert an image into a specific cell in a specific Google Sheet. If there is any python package and/or slice of code that can accomplish this, please let me know. As far as I am aware Gspread does not have anything helpful.
Ivan
  • 41
  • 1
  • 3
2
votes
1 answer

How to download a Google Docs excel sheet with a Gspread and access data locally (A1 notation)?

I need to download an excel sheet from Google Docs via Gspread and then multiple times I'll need to read the values of different cells in 'A1' notation. Thus, I can't just get the spreadsheet and then call val = worksheet.acell('B1').value, because…
2
votes
1 answer

How to insert any as a hyperlink in google sheet cell with gspread

I am trying to insert an email address into a google sheet cell as a hyperlink, so that only the word "email" will appear instead of the whole email address, here an example of what I want to do a cell that contain a hyperlink which is actually an…
2
votes
3 answers

adding a row google scheet python

I want to add a line to the google sheet document with python. But for some reason it doesn't work I always find this error: Traceback (most recent call last): File "D:\Utente\Desktop\BLS-Bonus-Nov-2019-v2\spreadsheet.py", line 27, in
2
votes
1 answer

Python Can I use gspread delete row in google sheet which create by google form?

I create google form and save data when user fill out google form to google sheet. After that I use gspread read data and create csv file. I want to remove all data in google sheet after python create csv file already. I user this code worksheet =…
user572575
  • 1,009
  • 3
  • 25
  • 45