Questions tagged [pygsheets]

A python library to access Google Spreadsheets through the Google Sheets API. Use this tag to ask questions about pygsheets usage and errors

pygsheets is a python library to access Google Spreadsheets through the Google Sheets API (currently API v4). Use this tag to ask questions about pygsheets usage and errors.

Github for the package: https://github.com/nithinmurali/pygsheets

Full package documentation: https://pygsheets.readthedocs.io/en/stable/

167 questions
6
votes
0 answers

Pygsheets unable to find the server at www.googleapis.com

I'm trying to use pygsheets in a script on ScrapingHub. The pygsheets part of the script begins with: google_client = pygsheets.authorize(service_file=CREDENTIALS_FILENAME, no_cache=True) spreadsheet = google_client.open_by_key(SHEET_ID) Where…
5
votes
0 answers

Spreadsheet not found using service_account_file

Hi I plan to deploy an app that would log to spreadsheets. I used the PyGSheets. I get a raise. raise SpreadsheetNotFound('Could not find a spreadsheet with title %s.' % title) pygsheets.exceptions.SpreadsheetNotFound: Could not find a spreadsheet…
Nikko
  • 1,410
  • 1
  • 22
  • 49
5
votes
1 answer

Read cell format from Google sheet using Python (API v4)

I'm looking for a way to read a cell's formatting from a Google sheet in Python, specifically, its background colour. Two popular packages I've found to be able to read a sheet are gspread (fork) and pygsheets. I tried both and they work well in…
Sidewinder
  • 369
  • 3
  • 13
5
votes
2 answers

pygsheets freeze first row

So I am playing with google spreadsheets and there is a handy feature to freeze first row or/and first column. But is there a way to do this through pygsheets? Or maybe other python library?
Grail Finder
  • 635
  • 2
  • 7
  • 21
4
votes
4 answers

How to update google sheet with new outcome every time python script runs?

I have a python script with each time running ,it returns a new value. Then I need to add those values to a google sheet. So every day the outcome of the scripts will be added to a new row. I tried to use “pygsheet” lib but I can not handle the…
lameei
  • 184
  • 2
  • 11
3
votes
1 answer

clear validated cells using a batch update using pygsheets

I have a pygsheets work sheet with cells that have been filled in and would like to clear the cells after pulling the data into python. My issue is that I have validated the cells with a particular data format then when I try to batch update the…
user4933
  • 1,485
  • 3
  • 24
  • 42
3
votes
2 answers

Finding cell using Pygsheets and update cells in the same column

I need to update every week a calendar in a Google Sheet with some numbers. I'm using pygsheets find to find the date, but them I am unable to get the column of that cell so I can update some rows within that column. enter code here for key in…
MariaMH
  • 55
  • 1
  • 2
  • 5
3
votes
2 answers

Sequential updates to ranges in Google Sheets API via pygsheets

I'm trying to update some cell ranges with defined format, but I'm running into a problem when the ranges overlap. For example, if I have a range of cells A1:C3 and I want to set cells A2:B2 to have a green background color, and then to have them…
Maciej B. Nowak
  • 1,180
  • 7
  • 19
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

SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac

I have a python script which runs quite well on the windows server but throws an SSLError exception when running on Ubuntu 16.04.5. I have used pygsheetsto connect to the google sheet. import pygsheets from oauth2client.service_account import…
Umar Aftab
  • 147
  • 4
  • 15
3
votes
1 answer

Pygsheets update_cells() not working

I am trying to update a range of 3 cells horizontally using pygsheets but I am having some issues The Error: Traceback (most recent call last): File "C:\Users\Art\Desktop\Python\Plain\General_testing.py", line 12, in
2
votes
1 answer

Batch update validation and formatting cells using pygsheets

I am using pygsheets and would like to batch validate cells instead of looping through each cell and doing it iteratively. I have gone through the pygsheets documentation and have not found an example of this, would this be possible and if so how…
user4933
  • 1,485
  • 3
  • 24
  • 42
2
votes
1 answer

Python 3 intermittent ssl.SSLEOFError

I'm doing a fetch from google sheets using pygsheets python module every 90 secs. During early hours of morning (usually between 2-3 AM) this operation fails, and I get this error logged: Traceback (most recent call last): File…
itChi
  • 642
  • 6
  • 19
2
votes
1 answer

How to have bolded headers, but non-bolded cells - filled with worksheet.append_table of pygsheets==2.0.1

The python3 (pygsheets 2.0.1) script below will bold all the cells starting at A2. Is there an easy way (i.e., in one command) to ask for all these cells not to be bolded? Code: import boto3, botocore import datetime import json import…
boardrider
  • 5,882
  • 7
  • 49
  • 86
2
votes
1 answer

How do I insert an Excel sheet or CSV into Google Sheets using pygsheets (with or without Pandas)?

I have some data in an Excel sheet, I need to programmatically be able to insert it into a Google Sheet via a short python script. I'm using pygsheets and pandas (if I need it). I have the auth stuff set up and I'm able to access the sheet I want to…
impostorsyndrome
  • 103
  • 1
  • 10
1
2 3
11 12