Questions tagged [google-sheets-api]

The Google Sheets API lets developers write third-party applications that read and modify any aspect of spreadsheets. Not to be confused with [google-apps-script]

The Google Sheets REST API enables developers to create applications that read and modify the data in Google Sheets.

This API is useful for:

  • Managing the worksheets in a Google Sheets file
  • Consuming the rows of a worksheet
  • Managing cells in a worksheet by position
  • Performing complex formatting of cell text

Example quickstarts are available for most popular languages, along with Google-provided client libraries.

References

6071 questions
1
vote
2 answers

Format a table and send in email

I am trying to send an email containing a table, I have managed to create the table but can not figure out how I copy over the format including the background colour and number format, as some cells contain currency as well as percentages and plain…
1
vote
1 answer

getting spreadsheet from google sheets only if that is not deleted

I want to get particular spreadsheet from it's sheet id with get method of Google sheets api. i am using below method to get a speadsheet. sheets_file = service.spreadsheets().get(spreadsheetId=sheets_id).execute() Here sheet_id is the id of sheet…
1
vote
1 answer

getting files from google drive from particular folder with Google drive API (Python)

I want to get list all spreadsheets from Google drive by using Google drive API. I have wrote a script in python which is returning me all spreadsheets list from my Google drive but the issue is that this list also contains files (and folders) that…
1
vote
1 answer

Google Apps Script - Programmatically Access Script ID From File ID

I'm using Google Apps Script to make many copies of spreadsheets that have embedded code inside of them. I want to be able to make a log of the Script IDs of each copy of the spreadsheet, without having to manually go into each spreadsheet, then…
Lle.4
  • 516
  • 4
  • 17
1
vote
1 answer

Iterate through all previous versions of Google Sheets

I want to iterate through all previous versions of a Google sheet and extract some information from all the versions along with version timestamp. Is there any easy to do so? I couldn't find any API which could loop through the previous versions.
1
vote
1 answer

How can I fetch Google Sheet name from Google sheet ID using python and google sheets API?

I have a code which exports Google sheets into csv and stores it in my local storage. I want to store the csv file with the same name as the google sheet name. Can someone help me out with this ? So right now, this code saves the csv file as…
VIOLET
  • 71
  • 1
  • 9
1
vote
1 answer

Trying to run more than one function onEdit - Google Sheets

I wrote a script that displays a browser message box whenever the word "Lost" is input on a particular column (I:I) on the sheet, and I also wrote another that inputs the date and time on (A:A) when cell (B:B) is actualised. But I'm struggling to…
1
vote
1 answer

Google Sheets api. Add values to empty cells in named range

I have 3 values that I have generated in array, that I want to append to a named range in the empty cells, at the beginning of the named range. I want it to fill in those empty cells, not add the values at the end of the range, which it is doing…
1
vote
1 answer

Change Email Notification Settings on a Google Sheet using Google Sheets API

Can someone point me at the API method for changing the "Email Notification Settings" on a Google Sheet? Thanks.
1
vote
1 answer

update value in google sheet with if condition in another column using python

I have a similar data as below in google sheet. I want to update the pageId for pagename "abc". I'm able to update manually passing B3 sheet.update('B3','updated_value') but How should I get B3 by adding a if condition where pagename=abc in python…
1
vote
1 answer

Fetch data from google sheet using React

I would like to fetch data from the google sheet with React. I tried to use the following libraries https://github.com/ruucm/react-google-sheets https://github.com/gglukmann/use-google-sheets However, it always requires setting the file permission…
coinhndp
  • 2,281
  • 9
  • 33
  • 64
1
vote
1 answer

How can i create DataValidationRule in Google DOCS API via gspread-formatting?

I need to create DataValidationRule: only numbers in cell. validation_rule = DataValidationRule( BooleanCondition(???), showCustomUi=True) ... set_data_validation_for_cell_range(sheet_, 'A2:B2', validation_rule)
PR0J3CT
  • 33
  • 5
1
vote
1 answer

How to read a single google sheets cell value in javascript

I am trying to pull just one cell value from a google sheet using javascript and the google sheets API, and I am using the below code, but I keep getting the below error which I can't understand because I am using the spreadsheet id and…
1
vote
4 answers

Accessing a public google sheet's data directly from client-side JavaScript

Is there a way to get cell values of a public google spread sheet ? GET https://sheets.googleapis.com/v4/spreadsheets/1vW01Y46DcpCC7aKLIUwV_W4RXLbeukVwF-G9AA7P7R0/values/A1A4?key=abcdef returns 403. I also sent the Referrer in Postman : Mozilla/5.0…
anjanesh
  • 3,771
  • 7
  • 44
  • 58
1
vote
1 answer

Trouble looping data from fetch, in a Sheets API to WooCommerce REST API App

I have a code I was using inside Google GAS but I had to refactore it a bit to use it outside and I'm having trouble with a for loop I had to form an array. I'll make the code reproducible with read API Keys in a dev envirorment. const…
vazcooo1
  • 181
  • 11