google-sheets-api

How can I change the color of a worksheet's tab

╄→гoц情女王★ 提交于 2021-02-10 05:50:52
问题 I have a python script that is pulling data from an external resource and adding data to a Google Sheet. For the most part I have everything working, except I'd like to change the color of a tab to signify the script status. The whole process starts by duplicating an existing tab within the sheet. The template tab has a black highlight by default. I then want to change the black to another color to show the data collection is in progress. And when done, change the color to green or red

Remove all grouped rows / columns in a spreadsheet

岁酱吖の 提交于 2021-02-08 08:54:29
问题 I have a Google Sheet that does dynamic grouping with a script. I am looking for a function that gets rid of all those Groups in the sheet again. Similar to expandAllColumnGroups, I would like to have a function called removeAllColumnGroups - but it seems there is no such function available. My current approach is very slow and cumbersome. I did quite some research but could not even find a way to get all the columnGroups or at least the start-column-IDs in a sheet, so I iterate over every

Append a list in Google Sheet from Python

Deadly 提交于 2021-02-07 13:21:34
问题 I have a list in Python which I simply want to write (append) in the first column row-by-row in a Google Sheet. I'm done with all the initial authentication part, and here's the code: credentials = GoogleCredentials.get_application_default() service = build('sheets', 'v4', credentials=credentials) I do not have any clue as to how I could possibly do this in an easy way. 回答1: How about this sample script? This sample appends list to column A. The list as data is 2 dimensional array. Please be

Get google sheet filter view data with api call

女生的网名这么多〃 提交于 2021-02-05 07:48:28
问题 There's really very little code I can show here. I'm calling a google sheets spreadsheet using the api with node.js. Within the spreadsheet, I have created a bunch of filter views . Is there a way to tell the api to call the filtered data instead of just getting all the data in the sheet. const dataFromGoogleSheets = `https://sheets.googleapis.com/v4/spreadsheets/${ config.spreadsheetId }/values:batchGet?ranges=${"Sheet1"}&majorDimension=ROWS&key=${ config.apiKey }`; UPDATE sheets

Get google sheet filter view data with api call

天大地大妈咪最大 提交于 2021-02-05 07:48:06
问题 There's really very little code I can show here. I'm calling a google sheets spreadsheet using the api with node.js. Within the spreadsheet, I have created a bunch of filter views . Is there a way to tell the api to call the filtered data instead of just getting all the data in the sheet. const dataFromGoogleSheets = `https://sheets.googleapis.com/v4/spreadsheets/${ config.spreadsheetId }/values:batchGet?ranges=${"Sheet1"}&majorDimension=ROWS&key=${ config.apiKey }`; UPDATE sheets

Google Apps Script/URLFetchApp and using returned data

旧城冷巷雨未停 提交于 2021-01-29 20:11:36
问题 I am very new to this, so please bear with me-- I have currently have an operational google apps script on the backend of a google sheet that is generated from Google Form answers. I am essentially setting up a ticket form in google forms that will trigger the data in the corresponding sheet to be sent via api call to our ticketing system. It works great, but I am trying to optimize it currently. The goal is to take the json response I get using: Logger.log(response.getContentText()); which

OnEdit Function without Manual EDIT

旧巷老猫 提交于 2021-01-29 19:57:01
问题 I use an OnEdit function to move data to another sheet whenever a changed in a particular column. But The change should happen with a formula. But, it is not working. example : When I change A1 to "ok" manually the OnEdit function work, but when the A1 cell change through an If condition to "ok" it's not moving and there is no movement. Can you help me work the Onedit function without a human interfere? 回答1: Issue: As you can see in the official documentation: onEdit(e) runs when a user

Error 500 at google spreadsheets_values get method

若如初见. 提交于 2021-01-29 18:43:40
问题 I read through a lot of posts but cannot find the reason or method to troubleshoot the error 500 when calling google sheet spreadsheets_values->get method. Here is my code, very standard header('Access-Control-Allow-Origin: https://script.google.com'); header('Access-Control-Allow-Origin: https://www.google.com'); require __DIR__ . '/vendor/autoload.php'; /** * Returns an authorized API client. * @return Google_Client the authorized client object */ function getClient() { $client = new Google

google docs linked charts refresh with api or apps script

寵の児 提交于 2021-01-29 18:23:37
问题 I have a google doc that I show inside an iframe in my website for public editing , it contains linked charts from a public spreadsheet, I change the chart data with spreadsheet api, but the chart in the doc does not refresh automatically, and I can't clic update or update all in the doc because the " update button " is disabled, SO I wanted to use google docs api or apps script to refresh charts, I did not find how to do it with google docs api , and apps script does not trigger inside the

Using Google Scripts to Query Multiple Google Sheets to A View

为君一笑 提交于 2021-01-29 10:25:42
问题 I have a Google Spreadsheet that stores employee availability information for my workplace. Every Sheet has the format shown in the example below, with the date fields changing based on the week for which I am collecting availability. Employees submit availability every week by submitting a Google Form that is linked to these Sheets on the backend. My workplace leadership has directed that I limit each Sheet to contain at most one week of data. 09 Jul - 13 Jul Responses Timestamp | Email