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

How to copy a cell formula into 1 row above, but reference the new row's data (and not the previous rows data)

When I use gspread to copy a cell formula from (target_cell) to (target_cell+1 row) the formula is correctly passed, however it is still referencing data from (target_cell)'s row. I need it to reference the new row's data. Similar to when you use…
seeker407
  • 43
  • 7
2
votes
2 answers

How do I import rows of a Google Sheet into Pandas, but with column names?

There are great instructions in a number of places to import a Google Sheet into a Pandas DataFrame using gspread, eg: # Open our new sheet and read some data. worksheet = gc.open_by_key('...').sheet1 # get_all_values gives a list of rows. rows =…
emmby
  • 99,783
  • 65
  • 191
  • 249
2
votes
1 answer

How to read comments from google sheet cells?

I want to access data from the commented cell in google sheets. I have done some work, and able to access the value in the cell. from oauth2client.service_account import ServiceAccountCredentials import json scope =…
kd007
  • 339
  • 1
  • 13
2
votes
1 answer

GSPREAD: How do I fetch the last added worksheet from a spreadsheet having many worksheets?

Using gspread, I know how to access a sheet by name, id or index, like: import gspread gc = gspread.authorize(credentials) worksheet = sh.worksheet("January") or worksheet = sh.sheet1 But I was wondering if it is possible to open a last added or…
Gokul Nath
  • 21
  • 3
2
votes
1 answer

python + google sheets == gspread, but sadly AttributeError: type object 'ServiceAccountCredentials' has no attribute 'from_json_keyfile'

I'm trying to connect google sheets with python using gspread library. I have tried a ginormous set of using examples of gspread, for no avail. I have also used google official libraries with the same tsunami of disappointment and despair (actually…
2
votes
1 answer

gspread append_row don't add from col A, starts from J

I am making a score keeper program. I want to add a row with append_row, but for some reason it doesn't start from A, instead it starts from J in the worksheet. Right now this is the code of the button: Button: text: "+1" on_press:…
Hahannibal
  • 21
  • 2
2
votes
1 answer

Python Google Sheets API Limit 429 Error with Loop

I am running a python script that is taking specific columns from one Google Sheet to another Google Sheet via the Google Sheets API and Gspread package, but I am running into a 429 Error when I am pushing a list to the new spreadsheet. This error…
cphill
  • 5,596
  • 16
  • 89
  • 182
2
votes
0 answers

How to pass list to google spreadsheet

Trying to get the values of the list into a spreadsheet, but it only seems to be printing when i place it as a string( meal = str(meal())). OTHERWISE GETTING an error, gspread.exceptions.APIError: { "error": { "code": 400, "message":…
FirmCiti Inc
  • 387
  • 1
  • 4
  • 14
2
votes
0 answers

oauth2client TypeError: super(type, obj): obj must be an instance or subtype of type

Set-up I'm using gspread to manipulate a google sheet with Python. All used to work fine, but now I'm getting an error when I try to use the credentials. All is set-up according to the great manual on Twillio.…
LucSpan
  • 1,831
  • 6
  • 31
  • 66
2
votes
1 answer

Accessing an organization-restriced Google Sheet via API

I am writing a Python 3.7 script that needs to read data from a Google Spreadsheet. The spreadsheet in question belongs to an Organization that my work Google Account is part of: let's just call it "Organization". The spreadsheet permissions are set…
2
votes
1 answer

Find address of a variable string in spreadsheet

I have a Google Spreadsheet, column1 contains test_name, and column two contains test result (pass or fail). I want to search the test_name (string) in spreadsheet and if it matches, fetch the row, column of the string and update the result in…
Manish
  • 21
  • 3
2
votes
1 answer

Handling race condition in Google Sheets

I am using gspread library to access and edit google sheets via python. Is there a good way to handle race conditions ( not necessarily using gspread only ) when there may be multiple workers writing to the same sheet. I use a Django server which…
Raj Malhotra
  • 89
  • 1
  • 11
2
votes
2 answers

How to copy a Google sheet with Python?

Is there a way to copy a Google Spreadsheet programatically using Python? I am using Gspread to manipulate my Google sheet, but there is no support for this functionality. Any suggestions?
DBE7
  • 766
  • 2
  • 9
  • 23
2
votes
0 answers

gspread - Using "find" function for input values

I'm writing a Python program using gspread and was wondering if there's any easy way to use the "find" function to search by input values instead of plain values. For example, I'm trying to locate =HYPERLINK("https://stackoverflow.com","Stack…
Shelby
  • 83
  • 1
  • 1
  • 5
2
votes
1 answer

How can I most easily authenticate with gspread in a Jupyter notebook?

Many of my partners at work are comfortable mainly with spreadsheets, and not python, scala, java, SQL, etc. These people are non-technical, but they need data and it's my job to get it in their hands. Reading about Google colaboratory, and their…