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
0
votes
0 answers

pygsheets - change color of cell

I'm trying to change color of cells in my google sheet through api, and it just takes wayyyyy to long to do it (after 10 minutes of a single cell i/my laptop gave up). google_worksheet.cell(column + str(j)).color = color_orange the column is 'A'…
0
votes
1 answer

python, pygsheets question - how to gain the color of each cell in a column, fast?

i have this code, that checks color of each cell in a google sheets worksheet. that would be ok, but for 1200 rows, it takes 400 seconds to do so, so i wanted to ask if someone know of a better way to check color of a each cell in a column(i couldnt…
0
votes
0 answers

How to convert excel containing Hyperlink and formulas to google sheet using python

I have used set_with_dataframe to convert excel sheet to google sheet,But excel sheet includes hyperlink and formulas.It copied as string. I want formulas and hyperlink in google sheet also. I tried with set_with_dataframe to import data, but it…
0
votes
0 answers

How To Find SSL Certificate To Download -- Python

I am receiving the below SSLCertVerificationError when attempting to utilize the pygsheets library to store a pandas df on a gsheet: SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer…
0
votes
0 answers

Python - Tkinter and Google Sheets - File not found

Anyone knows how to solve this one? Traceback (most recent call last): File "pygsheets\sheet.py", line 39, in _init_ FileNotFoundError: [Errno 2] No such file or directory:…
Santiago
  • 3
  • 1
  • 3
0
votes
0 answers

How do I assign a google sheet a owner and save location using pygsheets?

I'm using pygsheets to work with google sheets and need to assign myself as the owner with my email and have it save to my google drive but I'm struggling to find a solution in the documentation. The best I have…
Omega001
  • 31
  • 1
0
votes
0 answers

Editing chart in google sheet using pygsheet python

I am trying to analyse data from a google sheet using pygsheets wrapper and able to draw a line chart using same. The idea is to run data analysis on daily basis and add/update the chart accordingly. Here is the data with ranges in Google sheet,…
Ank Raw
  • 155
  • 10
0
votes
1 answer

Create tab and add N rows with pygsheets

I want to create an empty tab via pyghseets and add N rows, like I would do with the following button: Is there an easy way to do this in pygsheets? Thanks! Edit: My base code is the following: import pygsheets client = ### # Please use your…
David Masip
  • 2,146
  • 1
  • 26
  • 46
0
votes
1 answer

Questions about pygsheets

I tried three different ways to update values of a google sheets, but none of them works, I went through the pygsheet docs but I still can't find a solution to it. import pandas as pd import pygsheets as…
drew
  • 3
  • 1
0
votes
1 answer

Delete data in spreadsheet using pygsheets and filter

I have data in a google sheet with the following structure: I'd like to use pygsheets in order to delete the rows that match date == '2022-01-02', or any given date that I want to delete. Is there an easy way to do so by using pyghseets?
David Masip
  • 2,146
  • 1
  • 26
  • 46
0
votes
1 answer

googleapiclient.errors.UnknownApiNameOrVersion: name: sheets version: v4

I was using google sheet api and service account to write to a google sheet in my script. I have converted my python script to exe file. though my original script was working fine but now I am getting following error when running the exe…
glitch_123
  • 139
  • 12
0
votes
0 answers

How do I stop Python script from referring to deleted OAuth 2.0 Client ID?

Even though I've already generated a new OAuth 2.0 Client ID and client_secret json file, my script keeps on displaying this result: RefreshError: ('deleted_client: The OAuth client was deleted.', {'error': 'deleted_client', 'error_description':…
0
votes
1 answer

In pygsheets what is the proper way of selecting negative numbers?

I am using pygsheets to make a budget. I want to be able to store all the negative cells in some sort of dictionary (I'm not great with python yet) I've been able to select a DataRange of cells, but how do I add a filter to that? For example, drange…
4156
  • 380
  • 4
  • 17
0
votes
1 answer

I want to write data in a particular tab of a gsheet

I am able to pull the data using the below code in my Gsheet using the below code. #AUTHENTICATING THE CREDENTIALS FOR CONNECTING THE SCRIPT TO GSHEET gc = pygsheets.authorize(service_file='client_secret.json' ) # CONNECTING THE GSHEET sh =…
0
votes
1 answer

Automate a Gsheet Bigquery extract

I was looking for a way to automate the process of creating a extract from a big query table using a query. Would I use the gsheet app script or a python library? Is this possible?