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
3
votes
1 answer

How do I fix my left scale? Matplotlib and Pandas

I am trying to plot this data with matplotlib. I am able to get all of the data and make a graph of jones vs time, but my scale becomes wacky when I try to use the falls data set. The graph and code I created are below. import gspread from…
Alexis B.
  • 35
  • 5
3
votes
3 answers

GoogleSheets API:"Invalid JSON payload received. Unknown name "Number" at 'data.values[0]': Cannot find field

I am trying to copy contents of a spreadsheet into another spreadsheet but the error keeps popping up. Could you help to figure out why is it not copying over the data from one sheet to the other? This is the dummy data I am experimenting on in the…
3
votes
1 answer

How to get the current worksheet gid?

I use Python and Gspread to create a gsheet with about 40 worksheet containing datas about accounts. On the first worksheet, I want to put something like a summary with a link to the account's worksheet with something like…
3
votes
1 answer

How to insert row and change cell styles using batch_update in gspread?

I am using gspread and gspread_formatting to update my sheets in Google. Some of my codebase has been reworked to use batch_update, because I found some code samples in another answer that I could use as reference. However, I can't seem to convert…
darkhorse
  • 8,192
  • 21
  • 72
  • 148
3
votes
1 answer

Python gspread CellNotFound exception error

I want to check whether if a cell value exists in my sheet. If the cell exists, it will return yes and if it doesn't, it will return no. cell = sheet.find('test') if cell.value =='test': print('Yes') else: print('No') The above code works…
3
votes
2 answers

How to make an Airflow DAG read from a google spread sheet using a stored connection

I'm trying to build up Airflow DAGs that read data from (or write data to) some Google spread sheets. Among the connections in Airflow I've saved a connection of type "Google Cloud Platform" which includes project_id, scopes and on "Keyfile JSON", a…
Carlo
  • 395
  • 1
  • 8
  • 22
3
votes
1 answer

Better way to get access to Google Sheet with Python

How to automatize the process of getting access to Google spreadsheets? Right now we use gspread and oauth2client.service_account to get an access to Google spreadsheet. It works fine, but using OAuth2 credentials makes us manually share every…
3
votes
1 answer

How to update/insert rows and columns of google sheets dynamically in gspread?

I have a spreadsheet like below and i have an API which will give data as a list by date like below [05/06/2019', 10000, 14003, 140, $576.1786404] [05/07/2019', 11000, 14003, 140, $576.1786404] [05/08/2019', 50641, 14067, 357, $578.8120356] All I…
chethi
  • 699
  • 2
  • 7
  • 23
3
votes
2 answers

How to use wrap_strategy in python for google sheets?

I have a python code which uses drive and sheet api to list the files inside of a folder. I have multiple google sheets inside this folder and some of them have spaces in between texts, like the one given in the image. I wanted to change the text…
Prajakta Yerpude
  • 215
  • 6
  • 20
3
votes
1 answer

gspread input preceded by single quote

i'm using the gspread module and when i try to append new row, with some values, using the code below: sheet.append_row(['image1', '=IMAGE()']) it inputs the values in the next available row (as expected) but in the cell that's supposed to have…
Julliard
  • 523
  • 1
  • 6
  • 23
3
votes
0 answers

Is there a mechanism to trigger a Python script to update the google spreadsheet?

I am using gspread library in Python to write the data to a google spreadsheet. The data which is being written in the spreadsheet changes every day. So, my question is that is there a way to set some kind of trigger on the Google Spreadsheet which…
Rish
  • 804
  • 8
  • 15
3
votes
1 answer

python gspread - How to get a spreadsheet URL path in after i create it?

I'm trying to create a new spreadsheet using the gspread python package, then get its URL path (inside the google drive) and send it to other people so they could go in as well. I tried to find an answer here and here, with no luck. I created a…
shayms8
  • 671
  • 6
  • 13
  • 28
3
votes
2 answers

python3 gspread exception not caught

I have the following piece of code which attempts to capture a gspread.exceptions.APIError, usually as the result of a timeout of the Google spreadsheet credentials. _open_sheet requests a new set of credentials. def _findRow(self, entry): '''…
Mark Schulz
  • 1,070
  • 8
  • 11
3
votes
1 answer

DataFrame max() not return max

Real beginner question here, but it is so simple, I'm genuinely stumped. Python/DataFrame newbie. I've loaded a DataFrame from a Google Sheet, however any graphing or attempts at calculations are generating bogus results. Loading code: # Setup !pip…
JamesM
  • 71
  • 1
  • 6
3
votes
2 answers

Sort a spread sheet via gspread

I have a Google spreadsheet full of names, dates, and some other numbers. I made an desktop application that provides a nice UI for said info. After using the application a bit I became slightly annoyed with the order the data was being displayed.…
brainytwoo
  • 33
  • 2
  • 4