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
1 answer

pygsheets oauth - client secret file does not exist (Ubuntu 14.04)

I have succesfully installed pygsheets on windows 7, but on my Ubuntu 14.04 server I keep getting this error. The file is named to client_secret.json and placed in same dir with my py-files, so the path is relative and correct. Also tried full name…
CARTOS
  • 221
  • 2
  • 8
0
votes
1 answer

Getting TypeError: expected a character buffer object for a pandas.dataframe.replace call?

I'm building an interface between python and Google sheets using python2.7 & pygsheets: Error: Traceback (most recent call last): File "Tracker.py", line 108, in test.track() File "Tracker.py", line 99, in track …
Deepak
  • 149
  • 1
  • 1
  • 11
0
votes
1 answer

How can a worksheet be shared on team drive through pygsheet

I have worksheet with 2 sheets and Need to share it on team Drive. I read the documentation on pyghsheet ,In share pygsheet.share method we can pass group/user , But how can we share on a teamDrive. gc=…
Seema Mudgil
  • 365
  • 1
  • 7
  • 15
0
votes
1 answer

Using pygsheets is it possible to get a url for each worksheet

Using pygsheets its possible to list all the worksheet objects in an account but is it possible to get either a sharing url or a direct url to each workbook?
mobcdi
  • 1,532
  • 2
  • 28
  • 49
0
votes
1 answer

pygsheets authentication successful but token file not read back in correctly

I have the google api enabled and an oauth 2.0 id created on google console and i get prompted in a web browser to authorize access but then I get an FileNotFoundError error in Jupyter Labs gc =…
mobcdi
  • 1,532
  • 2
  • 28
  • 49
0
votes
0 answers

cutPaste and copyPaste from Google Sheets Api not working

I'm launching the cutPaste method of the google sheets api documented here: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#cutpasterequest in the manner described…
Antony Hatchkins
  • 31,947
  • 10
  • 111
  • 111
0
votes
1 answer

how to color rows in gsheets like in openpyxl?

I have the following code: import pandas as pd import openpyxl from openpyxl.styles import PatternFill import matplotlib import matplotlib.cm as cm import numpy as np import pygsheets import os data = [ [3, 'test', 1], [1, 'test', 2], …
Luka mikic
  • 23
  • 1
  • 6
0
votes
1 answer

reading/writing data frame to google sheets using pygsheets

What is the correct program flow to write different sized data frame to the same worksheet but ensure only the most recent data values written are visible? Here was my original sequence: gc = pygsheets.authorize(outh_file=oauth_file) sh =…
jainraje
  • 1
  • 1
  • 3
0
votes
1 answer

Conditionally setting background color to yellow with googlesheets api

I'm working with http://pygsheets.readthedocs.io/en/latest/index.html a wrapper around the google sheets api v4. I am interested in setting conditional formatting using the google-sheets-api v4. I'm trying to use a custom formula to highlight a row…
user1592380
  • 34,265
  • 92
  • 284
  • 515
0
votes
1 answer

Conditional formatting with pygsheets for google sheets api

I'm working with http://pygsheets.readthedocs.io/en/latest/index.html a wrapper around the google sheets api v4. I am interested in setting conditional formatting using the google-sheets-api v4. I'm trying to use a custom formula to highlight a row…
user1592380
  • 34,265
  • 92
  • 284
  • 515
0
votes
1 answer

How to upload a worksheet using pygsheets

I'm working with http://pygsheets.readthedocs.io/en/latest/index.html a wrapper around the google sheets api v4. I have a small script where I am trying to select a json sheet to upload to a google sheets worksheet. The file name is made up of…
user1592380
  • 34,265
  • 92
  • 284
  • 515
-1
votes
1 answer

How can I set an app script on a Google Sheet via the API?

Is there a way to set an App Script on a new Google Sheet via the Google Sheets API? We use pygsheets as our Python API Client for Google Sheets. Since we are using the onSelectionChange trigger to populate certain cells with a date, we would like…
-1
votes
1 answer

How to search thru Google Spread Sheet

I'm trying to find a value exist in the GSheet. Connection to Google sheet works. I can fetch all the worksheets within the files, but I can't some reason iterable the list of worksheets. Here is the file looks likes: I'm trying to find cell value…
miu
  • 189
  • 2
  • 13
-1
votes
1 answer

How to do a commparator that selcet certain certain row in function of characteristics?

So I'm trying to do a subscription comparator based on a google sheets. The g sheets has subscription characteristics in the first row and every other row is a subscription (g sheets so you can see what I mean) I have tried differents method but…
-1
votes
1 answer

pygsheets set_dataframe not being recognized

I am trying to write a pandas data frame to a google sheet # open google sheet where 'test' is the name of the project sh = gc.open_all('test') # update the first sheet with df, starting at cell B2 and second sheet with ds wks =…
1 2 3
11
12