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
8
votes
2 answers

Using google sheets api without client side login

I have a website that fetch data from a Google spreadsheet. I would like my users to see the fetched data without logging in. Is that possible and how? In order to fetch and update sheet data, I just need one account, ideally signed in at the server…
user780085
  • 101
  • 1
  • 1
  • 4
8
votes
3 answers

Access Google spreadsheet API without Oauth token

I've read google spreadsheet documentation https://developers.google.com/sheets/api/guides/authorizing And it says, that if document is public, you don't need Oauth 2.0 and API key is sufficient. I'm trying to do a test request with hurl and api key…
8
votes
0 answers

Google Drive Revisions not returning all revisions for a Google Sheet

I am trying to write a script for analyzing changes to a Google Sheets document. When I look at the version history inside of Google Sheets I see what appears to be a complete history of the document going back to 2014. However, when I try to…
Morty
  • 1,706
  • 1
  • 12
  • 25
8
votes
1 answer

Getting "This action would increase the number of cells in the worksheet above the limit of 2000000 cells" when calling Sheet API

I'm using Google Sheets V4 append API to insert data into a newly created sheet. I am inserting data with 1000 rows and 1001 columns i.e 1001000 cells. String url =…
Ranjani
  • 1,015
  • 1
  • 9
  • 15
8
votes
1 answer

Google sheets Java API cannot find client_secrets?

I am following the tutorial which shows how to connect to google sheets using Java. It uses gradle to get the dependencies as such apply plugin: 'java' apply plugin: 'application' mainClassName = 'Quickstart' sourceCompatibility =…
JCWong
  • 1,163
  • 1
  • 10
  • 29
8
votes
3 answers

Is there a way within a Google Apps Script to set a row height to fit the data

In Google Sheets, after selecting a series of rows and right clicking on one of them, there is an option under Row Height that is Fit to Data. I would like to do this in a script. All of my searching says no but I am hopeful. Columns are covered…
TC Lawrence
  • 133
  • 1
  • 3
  • 5
8
votes
4 answers

How to extract id from url ? Google sheet

I have the follow urls.…
TSR
  • 17,242
  • 27
  • 93
  • 197
8
votes
1 answer

Check sheet exist or not in spreatsheet Google spreadsheet API PHP

How to check if sheet exits in a spreadsheet (check sheet by name) or not using Google Sheet API. I have used Google Sheet API v4. If a sheet is not existed then create a new sheet. Thanks
Rigal
  • 611
  • 2
  • 6
  • 25
8
votes
2 answers

Read a Google Sheet with Python using API Key instead of OAuth Client ID [Python]

While there are several useful articles on how to use OAuth Client IDs to generate credentials needed for reading and writing to Google Sheets, I have been unable to make sense of how one would use the alternative API Key (token) in such a…
MoTrip
  • 119
  • 1
  • 5
8
votes
4 answers

Google Sheet API v4

I try to use example "Read multiple ranges": https://sheets.googleapis.com/v4/spreadsheets/{SpreadsheetID}/values:batchGet?ranges=Sheet1!B:B&ranges=Sheet1!D:D&valueRenderOption=UNFORMATTED_VALUES?majorDimension=COLUMNS from: Google Sheets API v4…
Alex Pilugin
  • 683
  • 2
  • 10
  • 38
8
votes
4 answers

What data types does Google Sheets support?

I haven't been able to find an answer online for this or in the Sheets documentation. What data types does a single cell in Google Sheets support? For example here is what I've seen so far: Is there a list of acceptable data types that Google…
David542
  • 104,438
  • 178
  • 489
  • 842
8
votes
3 answers

Filter data by column K in Google Script Editor (Google Sheets)

In this example, I have a set of data from a Google Sheet (4Cat) feeding into another sheet (ImportFeeder) where I am running my Google Script. At the end of the script below, how can I insert a filter script to sort the data by Row K? (only showing…
me9867
  • 1,519
  • 4
  • 25
  • 53
8
votes
2 answers

How to merge cells with Google Sheets API?

I am using the Python client for the Google Sheets API to build a spreadsheet. I am able to create a new sheet and update values in it, but I have been unable to merge cells for the header row that I want. top_header_format = [ {'mergeCells': { …
ctp_9
  • 338
  • 2
  • 10
8
votes
5 answers

Error 403 on Google Sheets API

The URL https://sheets.googleapis.com/v4/spreadsheets/[ID_OF_SPREADSHEET]?key=[MY_API_KEY] What I get { "error": { "code": 403, "message": "The caller does not have permission", "status": "PERMISSION_DENIED" …
Nazar Abubaker
  • 495
  • 3
  • 7
  • 17
8
votes
2 answers

Listener on edit of a document with Google Sheets API v4

I am running a script locally with Node.Js using the "Google Sheets API v4" to read and record data in a Google Sheets. I would like to know if it is possible to create a listener with the same API that it is triggered when someone edit a…
Pascal Landry
  • 81
  • 1
  • 3