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
1 answer

Discord.js says "message is empty" but console.log shows data

I'm currently working on a project that sends the information of my google-spreadsheets to a discord channel. So, I have some questions: 1) The final data (value), when I try to console.log(value), it worked! So that means it does get the data from…
1
vote
1 answer

If Cell Contains formula; then, Copy Formula to Destination Sheet else value or blank , As it is

I have a script that helps to copy data from the source sheet(UserForm) to the destination sheet(Datasheet), it works great. Now I need an additional task that if E12 to E22 has formula or value, copy as it is. now it gets only value but not…
1
vote
1 answer

Reducing process cost of a script

I'm building a Google Sheet that has two main sheets to it: (i) the user interface where they include the data (Name: "Interface Boletagem" - let's call Sheet A) and (ii) the database where the data gets stored (Name: "Boletador (Dados)" - let's…
1
vote
1 answer

How to speed up copy large data from 1 file to another file?

I need your help to improve my apps script code in order to copy a dataset from 1 file to another file in Google Sheets. Currently it takes nearly 6 mins to finish this execution but our data is bigger by days. My details case is In the source…
1
vote
1 answer

Updating spreadsheet data with Google Spreadsheet api and php suddenly not working with authentication error

In a form which takes input and updates the value in a spreadsheet. It was working fine before but suddenly stopped working with this error message: Fatal error: Uncaught exception 'Google_Service_Exception' with message '{ "error": { "code": 403,…
1
vote
1 answer

How can I use data from a Google Sheet on a website without needing the user to be logged in?

I'm trying to use Google Sheets as a data source for a dynamic web application, without needing the user to be logged in client-side. I'm using Bang's answer from this post but still need to be logged in to Google myself in order for access to the…
1
vote
1 answer

Format cells in google sheets from API V4

I'm starting to develop with the Google Sheets api after checking the documentation there are several things that I don't understand or I can't find. This is the endpoint I am…
synffryd
  • 171
  • 2
  • 3
  • 10
1
vote
2 answers

Using gspread, trying to color one string

In google sheets, I am trying to find a string something like "find" and highlight the string. Please see below. cell_list = worksheet.findall("find")
himnaejah
  • 39
  • 1
  • 8
1
vote
1 answer

Is it possible to use the Google Sheets JavaScript API WITHOUT user consent or auth tokens

Background: I know it is possible to read/write data from/to a Google sheet using the JavaScript API. I know it is possible to do it with an API key paired with oAuth (because the service has to know who the user is, which really means being a…
1
vote
0 answers

Google sheets cell as plain text from the API

I am trying to change cell format to plain text from google api: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/batchUpdate Doing it directly from google drive gives me a completely different result than doing it from the…
1
vote
1 answer

Writing data to google sheets in a single column tries to write data to a column outside the determined range

I have a google sheet in which I would like to add data to a certain range: And to write the data I use: ws = sheet.worksheet('test_sheet') ws.update("HG3:HG5", [["test_1", "test_2", "test_3"]]) But I can an error: APIError: {'code': 400,…
Jonas Palačionis
  • 4,591
  • 4
  • 22
  • 55
1
vote
4 answers

How to translate only text in formatted HTML code using Google Apps Script?

I have been trying to translate text from HTML code. Here is an example: var s = 'X stopped thebreakout session' When I try =GOOGLETRANSLATE(s,"en","fi") in Google Sheet, it also changes the tags…
user12736831
1
vote
2 answers

Uncaught Error: Undefined constant Google\Service\Sheets::spreadsheets in

I am trying to access a google sheet using Google's sheets API using PHP I am stuck with this error ! Fatal error: Uncaught Error: Undefined constant Google\Service\Sheets::spreadsheets in {my file path} :8 Stack trace: #0 {main} thrown in {my file…
1
vote
1 answer

Google Sheets API - search by keyword and return results [nodeJS]

I develop a simple app which uses Google Sheets as database. So far I was only using it to get the rows and it was enough for me. But now I’d like to add the feature where user can search by sheets values. Unfortunately, I couldn’t find in docs or…
1
vote
1 answer

How to convert List> into Map

I created a function, _queryOffline(), for retrieving data from a local Sqflite database and inserting it into a Google Sheets worksheet via Google Sheets API when internet is available. Basically, I iterated database query calls using a while loop…