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
16
votes
3 answers

Google Sheets API: The caller does not have permission

I'm trying to read the document from the cron: https://sheets.googleapis.com/v4/spreadsheets/?key= My document is available to anyone with the link. My #1 key settings: Application restrictions: - IP addresses (web servers,…
16
votes
2 answers

How to specify the gid (tabs) in Google Spreadsheet API v4?

I am trying to use RESTful API to gather the data from a Google spreadsheet spreadsheet. I read the document at https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get but I cannot a way that allows me to specify a…
Jamie Phan
  • 796
  • 1
  • 7
  • 26
16
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: …
16
votes
3 answers

Accessing older GData APIs (Spreadsheet API) using OAuth 2 and a service account

The short question is whether is this possible and if so, how? Outline I have a .NET application which currently uses a service account to access information across a Google Apps domain using the Google Drive API. This works fine using the…
Mark Embling
  • 12,605
  • 8
  • 39
  • 53
16
votes
5 answers

Creating empty spreadsheets in Google Drive using Drive API

I want to create an empty Google Sheet (created only with metadata) in Google Drive. When I referred to the Google SpreadSheet API documentation, it says to use the DocumentsList API, but it's deprecated and instead asks me to use the Google Drive…
15
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
  • 151
  • 1
  • 5
15
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
  • 23,743
  • 21
  • 113
  • 209
15
votes
3 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
  • 323
  • 1
  • 3
  • 11
15
votes
6 answers

Google Docs Spreadsheet to JSON

I've seen numerous articles on this but they seem outdated, for instance none of the Google Docs Spreadsheet urls has key parameter. I read this as well: JSON data from google spreadsheet Then I read this to access data …
user2727195
  • 7,122
  • 17
  • 70
  • 118
14
votes
4 answers

Connect to googlesheets via shiny in R with googlesheets4

I'm trying to use an updated version of this example to connect to a private googlesheet via shiny, and deploy this app on the shinyapps.io server. The user is not required to authenticate to a google account as the app uses a specified pre-existing…
CCID
  • 1,368
  • 5
  • 19
  • 35
14
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…
14
votes
3 answers

gspread authentication throwing insufficient permission

Using developers.google.com we created api user and downloaded credentials as json file. Now On my macbook gspread authentication is working fine while using credentials.json. when moved same config to linux server on aws its giving 403…
Ahsan Naseem
  • 1,046
  • 1
  • 19
  • 38
14
votes
5 answers

Is there a way to enlarge an image on mouse click in Google Sheets?

I basically have small images in a table that I'd like to enlarge on mouse click. I'd like the enlarged image to appear on the center of the page. On mouse click again to remove the enlarged image. I was able to do this on Excel using a VB script…
14
votes
2 answers

Create spreadsheet using Google Spreadsheets API in Google Drive

I have successfully created a new worksheet in an existing spreadsheet of My Google Drive account through a simple Java code mentioned in Google's official documentation on Developer Guide Sheets API but want to create a new spreadsheet in my Google…
Satyam Koyani
  • 4,236
  • 2
  • 22
  • 48
13
votes
1 answer

How to get an "Image in cell" URL from the Google Sheets API

I use sheets.spreadsheets.values.get to get information inside a Spreadsheet, but the cells that contain images show an empty string value. I tried using values:userEnteredValue as a parameter for the request (as shown in this question Retrieve…
Bruno Puccio
  • 143
  • 1
  • 8