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

Google Sheets API returns "The caller does not have permission" when using server key

I've generated a server key in the API Manager and attempted to execute the following on my Mac: curl 'https://sheets.googleapis.com/v4/spreadsheets/MySheetID?ranges=A1:B5&key=TheServerKeyIGeneratedInAPIManager' But this is what it returns: { …
Instabrite
  • 2,079
  • 2
  • 10
  • 7
118
votes
12 answers

How can I access Google Sheet spreadsheets only with Javascript?

I want to access Google Spreadsheets using JavaScript only (no .NET, C#, Java, etc.) I came here and was shocked to know that there is NO API for JavaScript to access Google Sheets. Please tell me how to access (CREATE/EDIT/DELETE) Google Sheets…
106
votes
8 answers

Accessing Google Spreadsheets with C# using Google Data API

I'm having some information in Google Spreadsheets as a single sheet. Is there any way by which I can read this information from .NET by providing the google credentials and spreadsheet address. Is it possible using Google Data APIs. Ultimately I…
90
votes
6 answers

Selecting Multiple Values from a Dropdown List in Google Spreadsheet

The Google Spreadsheet looks like can only select one value in the dropdown list. Is there any way to select multiple values from a dropdown list in google spreadsheet?
user3084196
  • 925
  • 1
  • 9
  • 7
74
votes
8 answers

How do I access (read, write) Google Sheets spreadsheets with Python?

I am wondering if you can point me to an example of reading/writing to/from a google doc/spreadsheet using python. I did look at google docs API here https://developers.google.com/google-apps/spreadsheets/ but not sure if I hit the right link. Also…
60
votes
12 answers

Google spreadsheet api Request had insufficient authentication scopes

I'm making an script to read data from google spreadsheet using the following script on nodejs: var url = oauth2Client.generateAuthUrl({ access_type: 'offline', approval_prompt: 'force', scope: [ …
jtomasrl
  • 1,430
  • 3
  • 13
  • 22
53
votes
2 answers

Sheet.getRange(1,1,1,12) what does the numbers in bracket specify?

Sheet.getRange(1,1,1,12) I cannot understand the arguments 1,1,1,12 . What is this - the sheet id or row or what? method getRange(row, column, optNumRows, optNumColumns) here what does optNumRows and optNumColumns mean???
50
votes
2 answers

Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential

I am trying to update Google sheet values. "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential." I want to do this using API key not outh 2.0 Can anyone have any…
Rana Ghosh
  • 4,514
  • 5
  • 23
  • 40
49
votes
4 answers

Google Sheets API: How to find a row by value and update it's content

I am working on an Android application that uses a Google Spreadsheet as a database. The application should GET, APPEND and UPDATE values in a spreadsheet, using the Sheets API v4. The first two functions are working fine but I have difficulties…
ferenckovacsx
  • 611
  • 1
  • 5
  • 6
40
votes
7 answers

Get list of sheets and latest sheet in google spreadsheet api v4 in Python

I am trying to read and write values of different sheets in python 3 following the google official documentation. Though I am able to read values from certain sheets using range property in rangeName = 'Class Data!A2:E' in the code block mentioned…
nexuscreator
  • 835
  • 1
  • 9
  • 17
40
votes
13 answers

Download a spreadsheet from Google Drive / Workspace using Python

Can you produce a Python example of how to download a Google Sheets spreadsheet given its key and worksheet ID (gid)? I can't. I've scoured versions 1, 2 and 3 of the API. I'm having no luck, I can't figure out their compilcated ATOM-like feeds…
40
votes
4 answers

How to automatically import data from uploaded CSV or XLS file into Google Sheets

I have a legacy database system (not web accessible) on a server which generates CSV or XLS reports to a Google Drive folder. Currently, I am manually opening those files in Drive web interface and converting them to Google Sheets. I would rather…
36
votes
5 answers

External API call in Google Spreedsheet is possible?

I have created a Google Spreadsheet with five columns; Once the user filled the values in the first three columns, It has to call a 3rd party API and fill the value(response) in the forth and fifth columns. Is it possible to write a code in Google…
It's me
  • 1,065
  • 6
  • 15
  • 30
34
votes
2 answers

How do you insert a single row into Google sheets using Sheets APIv4 Java

If I want to insert a row into Google sheets using Java at a specified index, then write to that row, how would I go about that?
A_Elric
  • 3,508
  • 13
  • 52
  • 85
32
votes
7 answers

How to convert Time into decimal float in Google Sheets using Script?

I want to convert the time HH:MM into H.xx Like I am getting it in this format: Sat Dec 30 00:00:00 GMT+05:21 1899 But this value is 04:29 in cell. I want it to be 4.5 hours to multiply it to hourly rate.
TheOnlyAnil
  • 877
  • 1
  • 15
  • 27
1
2 3
99 100