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
31
votes
19 answers

ImportError: No module named cryptography.hazmat.bindings._openssl

CryptoUnavailableError: No crypto library available and from oauth2client import crypt failure. I had the above error mentioned in the link. I was able to fix that by reinstalling pyOpenSSL and cryptography. But now the following error is being…
20
votes
5 answers

How to delete/remove row from the google spreadsheet using gspread lib. in python?

I want to delete a record from a google spreadsheet using the gspread library. Also, how to can I get the number of rows/records in google spreadsheet? gspread provides .row_count(), which returns the total number of rows, including those that are…
Chintan
  • 1,204
  • 1
  • 8
  • 22
18
votes
10 answers

Appending pandas Data Frame to Google spreadsheet

Case: My script returns a data frame that needs has to be appended to an existing google spreadsheet as new rows of data.As of now, I'm appending a data frame as multiple single rows through gspread. My Code: import gspread import pandas as pd df =…
BALAJI
  • 183
  • 1
  • 1
  • 6
18
votes
6 answers

How to find the first empty row of a google spread sheet using python GSPREAD?

I am struggling to write codes that find me the first empty row of a google sheet. I am using gspread package from github.com/burnash/gspread I would be glad if someone can help :) I currently have just imported modules and opened the…
Thành Đạt
  • 317
  • 2
  • 3
  • 15
14
votes
3 answers

gspread authentication throwing insufficient permission

Using developers.google.com we created api user and downloaded credentials as json file. Now On my macbook gspread authentication is working fine while using credentials.json. when moved same config to linux server on aws its giving 403…
Ahsan Naseem
  • 1,046
  • 1
  • 19
  • 38
14
votes
5 answers

Python/gspread - how can I update multiple cells with DIFFERENT VALUES at once?

To update a range of cells, you use the following command. ## Select a range cell_list = worksheet.range('A1:A7') for cell in cell_list: cell.value = 'O_o' ## Update in batch worksheet.update_cells(cell_list) For my application, I would like…
ecollis6
  • 5,357
  • 4
  • 17
  • 12
12
votes
3 answers

gspread "SpreadsheetNotFound" on certain workbooks

I have a google drive folder with hundreds of workbooks. I want to cycle through the list and update data. For some reason, gspread can only open certain workbooks but not others. I only recently had this problem. It's not an access issue because…
jason
  • 3,811
  • 18
  • 92
  • 147
12
votes
3 answers

Python SSL error Decryption failed or bad record mac

I am trying to use gspread python module to read the google spreadsheet. But I am getting some error from ssl. I have tried to look into this, but couldn't able to make it work. The gspread module is using python request internally which seems to be…
Nikhil N
  • 4,507
  • 1
  • 35
  • 53
12
votes
4 answers

GSpread ImportError: No module named oauth2client.service_account

Ok I'm following along with the Become A Technical Marketer course and I'm trying to learn how to manage Google Spreadsheets with GSpread. I've followed along with the documentation at http://gspread.readthedocs.io/en/latest/oauth2.html. I've…
11
votes
2 answers

Updating cell values with formulas results in apostrophe prefixes with Sheets API

I'm using gspread and the Google Sheets API to update cell values, setting cell.value equal to a string of a specific formula. Example code: # Calculates sum of cells in current row from column B to H G_SHEETS_ROW_SUM_COMMAND =…
Lukas Velikov
  • 562
  • 4
  • 16
10
votes
1 answer

Sharing Google sheet with service account email

I wrote a script to connect to a Google spreadsheet and load data into a postgresql database from it. I already created a service account and obtained the necessary credentials for it in a .json format,the problem is when I try to share the google…
johan855
  • 1,578
  • 4
  • 26
  • 51
9
votes
3 answers

gspread.exceptions.SpreadsheetNotFound

I am writing a python(ver 3) script to access google doc using gspread. 1) import gspread 2) from oauth2client.service_account import ServiceAccountCredentials 3) scope = ['https://spreadsheets.google.com/feeds'] 4) credentials =…
TestIsFun
  • 145
  • 2
  • 2
  • 9
9
votes
3 answers

How to get the Worksheet ID from a Google Spreadsheet with python?

I'd like to identify a method to attain the Worksheet ID within the URL for each of the worksheets within a Google Spreadsheet Workbook. For example, the worksheet id for 'sheet2' of this workbook is '1244369280' , since it's url is…
Chris
  • 5,444
  • 16
  • 63
  • 119
8
votes
4 answers

ImportError: No module named gspread

I'm trying to work with the gspread library in python. i installed the lib with pip install gspread but when I run the code: import gspread from oauth2client.service_account import ServiceAccountCredentials scope =…
Niels Dingsbums
  • 113
  • 1
  • 1
  • 7
8
votes
5 answers

gspread error code 400 "Range ('name'!name) exceeds grid limits"

I am using python 2.7 on a Raspberry Pi with version 3.0.0 of gspread. When I use gspread's get_all_values() function, I get the following error: File "/home/pi/DB/GSheets/GoogleSheets.py", line 121, in GetAll listOfLists =…
Ctrl S
  • 1,053
  • 12
  • 31
1
2 3
63 64