Questions tagged [google-sheets-api]

The Google Sheets API lets developers write third-party applications that read and modify any aspect of spreadsheets.

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

3524 questions
12
votes
6 answers

Hyperlink to a specific sheet

I would like to open a specific sheet of a Google Sheets from a hyperlink in another spreadsheet. I have different links in my master spreadsheet and each should have a hyperlink to the same slave spreadsheet but to a different sheet. I know…
ulisse
  • 187
  • 1
  • 3
  • 12
11
votes
4 answers

Accessing Google Sheets Api with Python

I'm currently trying to make updates to google sheets via python and I'm running into some issues with permissions. I've been following the instructions from this Twilio…
KirklandShawty
  • 253
  • 2
  • 10
11
votes
3 answers

Chrome Extension identity: OAuth2 request failed: Service responded with error: 'bad request'

I followed https://developer.chrome.com/extensions/tut_oauth exactly step by step but I am stuck at https://developer.chrome.com/extensions/tut_oauth#identity_permission where after I execute my extension, instead of getting the token, I get the…
11
votes
3 answers

Get Google Sheets Last Edit date using Sheets API v4 (Java)

I'm using the Google Sheets API v4 in Android. https://developers.google.com/sheets/api/quickstart/android I need to know when the last modification to the sheet was made (including by user); I need this guy: I'd like to do something like this: …
11
votes
2 answers

How can I add a new tab to an existing sheet via the Google Sheets API?

I tried reading through the api docs but failed to find directions to perform queries regarding the existence of tabs and to create a tab if one does not exist. Does anyone have a clue?
Oded Badt
  • 213
  • 2
  • 10
11
votes
2 answers

Google Sheets API: How to "publish to web" for embeddable sheet?

If I wanted to publish a Google Sheets spreadsheet so I could embed it on a page within an iframe, I would manually do the following: Navigate to Google Drive Open a spreadsheet File > Publish To Web > Embed > Copy the generated iframe link into an…
11
votes
3 answers

Import google spreadsheet data into google forms with app script

I searched the internet and I can't find a response to this nor the documentation for it. I need to dynamically generate Google forms questions with data from a Google spreadsheet using app script, but I don't know how to reference and read a…
11
votes
4 answers

How do I connect Android apps with Google Sheets spreadsheets?

I'm trying to do an Android app that needs to work with Google spreadsheet API. I'm new in this, so I'm starting with the version 3 of the api: https://developers.google.com/google-apps/spreadsheets/ I followed all the steps, downloaded all the jar…
10
votes
3 answers

Google Sheets API addProtectedRange Error: No grid with id: 0

I am not sure if I am making a mistake or if possibly this is related to the same issue reported here: Google Sheets API V4 - Autofill Error - No grid with id: 0 I am getting: HttpError 400 "Invalid requests[0].addProtectedRange: No grid with id:…
10
votes
4 answers

How can my Google Apps Script be run by others the Sheet is shared with?

I've got a Google Apps Script that works fine for me. Others who the sheet is shared with that try to use it get the message: You do not have access to perform that action. Please ask the owner of this item to grant access to you. The script is…
9
votes
3 answers

Using Google Docs and Google Spreadsheet APIs for Android

I am planning on using the Google Documents List, and Google Documents Spreadsheet API's for uploading a database from my app to a spreadsheet online and then editing it. I just wanted to know if these API's would be the right approach for using…
gtdevel
  • 1,483
  • 5
  • 21
  • 36
9
votes
0 answers

Google Sheets API Failing with 500

I made this URL public a few years ago as a way to retrieve data. It was working yesterday. Today my site is crashing as it relies on this data, but google is now returning a 500 error if I try to retrieve it programmatically (through…
Luke Schlangen
  • 3,088
  • 2
  • 26
  • 56
9
votes
4 answers

How to use sheet ID in Google Sheets API?

Google Sheets document can contain some sheets. First is default and '0'. Generally for any sheet there is address like this: https://docs.google.com/spreadsheets/d/(spreadsheetId)/edit#gid=(sheetId) with both spreadsheetId and sheetId. But in API…
Daniel
  • 5,039
  • 2
  • 28
  • 53
9
votes
3 answers

How can I Group Rows via the Google Sheets API?

I'm looking for a way to create a group of rows via the Google Sheets API - is there a way to do this? I can't see to find an API that will do this, but it seems like it should be a fairly common formatting need. This feature is supported in the UI…
Darby Frey
  • 91
  • 1
  • 4
9
votes
3 answers

How To Use Google Sheets API v4 To Create New Sheet or Tab in Spreadsheet with PHP

With PHP, it is unclear from the Google Sheets API v4 documentation on how to create a new sheet (aka "tab") in an existing spreadsheet. I can do it with batchUpdate, oddly, via the API Explorer, but they don't explain from that how to do this in…
Volomike
  • 21,378
  • 19
  • 99
  • 188