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
8
votes
2 answers

gspread findall() only within 1 column

I am trying to find the cell locations of specific IDs within the first column of a google spreadsheet using gspread. Is there a way to search only within the first column, and not the entire spreadsheet? I have been using: …
klarow
  • 81
  • 1
  • 2
8
votes
1 answer

Does the Google Spreadsheet Python API or gspread allow images or rich text?

Is it possible with gspread or other Python-based access to Google Spreadsheets to insert an image into a spreadsheet? Also, is it possible to make rich text cells (e.g., bold, italic, different fontsize, colors, etc.)?
dslack
  • 835
  • 6
  • 17
8
votes
2 answers

google spreadsheets gspread append_row issue

I'm working on a program that generates a dynamic google spreadsheet report. Sometimes when I create a new row (with data) in google spreadsheet using gspread append_row function it doesn't work as expected and no exception is thrown. The new line…
Lior Mizrahi
  • 161
  • 1
  • 2
  • 6
7
votes
2 answers

GSpread Column Sizing

I am trying to adjust the width of columns in a google sheet using GSpread, however I can't find any documentation on the subject all across the web. I have tried the actual project documents itself, and stack overflow. I have looked through the…
Dylan Logan
  • 395
  • 7
  • 18
7
votes
2 answers

Correctly installing pyOpenSSL for Python (Windows)

I'm trying to make an application that automatically updates a Google Plus spreadsheet. In order to do this I had to set up gspread, which also requires pyOpenSSL in order to work. Without it, it throws this error: CryptoUnavailableError: No crypto…
Constantly Confused
  • 595
  • 4
  • 10
  • 24
7
votes
2 answers

python gspread library only writes to worksheet labeled 'sheet1'

My sheet is named 'doc_name', and it has two worksheets, 'sheet1' and 'sheet2'. but, i can only write data to the worksheet labeled 'sheet1'? is this a limitation or am i doing something wrong? this works, wks = gc.open("doc_name").sheet1 but this…
user3768071
  • 727
  • 5
  • 12
  • 17
7
votes
1 answer

Using gspread with proxy

I am trying to access google spreadsheets through gspread api in python. I have imported gspread. I am getting socket. error: [Errno 10061] No connection could be made because the target machine actively refused it at gc =…
Harshil Pansare
  • 1,117
  • 1
  • 13
  • 37
6
votes
1 answer

How to use .find() to locate a cell and start updating cells in rows below in loop?

I'm automating filling out a Google Sheet with data taken from CSV. For the automation, I want to be able to use .find() to locate a specific cell value that is used as a reference for where to start updating cells. To better explain: My code uses…
feners
  • 645
  • 5
  • 19
  • 48
6
votes
1 answer

Append rows to Google Sheets using gspread or googleapiclient

Task: I have a dataframe and I would like to append that data to a Google Sheet. The sheet has exactly the same columns as the DF and has exisiting data which I don't want to overwrite, but just add rows at the end of the sheet using the values from…
user12512457
  • 65
  • 1
  • 1
  • 5
6
votes
1 answer

How to use the scope https://www.googleapis.com/auth/drive.file correctly

I have tried accessing a Google Sheets file in my Google Drive with this code: import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://www.googleapis.com/auth/drive'] credentials =…
janjackson
  • 351
  • 2
  • 11
6
votes
4 answers

Inserting a list of list in python to google sheets using gspread

I have created a nested list in python which looks like my_list = [[a,b],[c,d],[e,f],[g,h].....] What I want to do is insert this list as a batch so that each element gets inserted in a new row in the google sheet. This list is generated from an…
Sameera
  • 151
  • 2
  • 11
6
votes
2 answers

Python - Gspread Request Error 401

I'm currently making a Discord-bot that connects to a Google-spreadsheet (gspread). But after I've been running it for a while it starts to hand out errors and it can't connect to my gspread anymore (unless i restart it). The error that I'm…
Simvid
  • 63
  • 1
  • 3
6
votes
2 answers

What is the gspread import_csv file_id parameter?

I am trying to use the gspread Python package to import CSV data into a Google sheet from the command line. Using this guide, I got everything working, and was able to both read and write to cells. However updating cells 1-by-1 is too slow, so I…
Don't Panic
  • 13,965
  • 5
  • 32
  • 51
6
votes
5 answers

How to write a python script to manipulate google spreadsheet data

I am able to get the feed from the spreadsheet and worksheet ID. I want to capture the data from each cell. i.e, I am able to get the feed from the worksheet. Now I need to get data(string type?) from each of the cells to make a comparison and for…
GeminiDNK
  • 117
  • 2
  • 3
  • 7
6
votes
1 answer

python gspread google spreadsheet keeping connection alive

I'm updating my spreadsheets using gspread, the process takes about an hour, i have about 200 spreadsheets. It seems about 30 minutes into the updating the sheets, the connection drops. Is there a way to keep the login alive? I thought I was keeping…
jason
  • 3,811
  • 18
  • 92
  • 147
1
2
3
63 64