google-spreadsheet-api

Unable to generate URL to send to user for requesting access to a particular non-public google sheet

眉间皱痕 提交于 2019-12-11 07:29:58
问题 I have been trying to solve this problem for the past couple of days but I am unable to succeed. I need to generate a url, which asks the user permission to read a particular Google Sheet of theirs, and if they agree, I will have access to read that sheet. I have read and re-read the Google Sheet API here, and the Google REST API for Node here, but I am having trouble applying it to my particular case. I was able to successfully use the REST API guide to read the meta details about all the

Simple Google Spreadsheet For Each Loop?

烈酒焚心 提交于 2019-12-11 06:30:04
问题 It's been a long time since I've coded. I've never looked into scripts for google spreadsheets before. I just want to make a simple effect to edit the spreadsheet. If I understand correctly, this is doable so long as you run it manually? The syntax is throwing me off too much. My basic goal is to set each cell in a fixed column range to equal itself plus the value in the adjacent column, and then set that second value to 0. My instinct would be to do something such as CellRange[i][j] selected

write data in google sheet using a web script app

爱⌒轻易说出口 提交于 2019-12-11 06:14:30
问题 I am trying to do Something apparently very simple, but I don't get it : I would like to create a google web app, in wich the user write some text, and when he clicks on a button, the text goes into a Google Sheet. Then, I would like to do also the contrairy : when the user click on a other button of the google web app, he can see what is written in a cell of the google sheet My biggest problem is that i just don't know how to do the connexion between the webb app and the sheet, and how to

Google Spreadsheet App script to refresh the access token

ε祈祈猫儿з 提交于 2019-12-11 06:13:22
问题 I am using the below HTTP request to retrieve data from my associated YouTube channel. https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3D{MY_ASSOCIATED_CHANNEL_ID}&start-date=2016-08-01&end-date=2016-08-31&metrics=views&dimensions=video&filters=video%3D%3D{MY_VIDEO_ID}&max-results=10&sort=-views& access_token= {MY_ACCESS TOKEN} I am using google spreadsheet app script to process the above request. Could you please help me to setup an additional function which will

Automate Google Spreadsheet data load from external database

非 Y 不嫁゛ 提交于 2019-12-11 05:20:25
问题 I have a shared Google spreadsheet. Some columns of a worksheet must be filled with data (SQL query) that exist in a DB server (PostgreSQL). Also the data load must be scheduled to be done automatically (e.g. at 1.00 o'clock every day) . Finally I need some tweaks in the spreadsheet (e.g after the load to put the datetime in the name of the worksheet or send a confirmation email etc) What is the best and easiest approach to achieve this? (I start looking Google app scripts and Google Sheets

I'm running into some quota issue

强颜欢笑 提交于 2019-12-11 05:16:36
问题 I have the following code to clear all filters in every sheet: function clearAllFilter() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var ssId = ss.getId(); var sheetIds = ss.getSheets(); for (var i in sheetIds) { var requests = [{ "clearBasicFilter": { "sheetId": sheetIds[i].getSheetId() } }]; Sheets.Spreadsheets.batchUpdate({'requests': requests}, ssId); } } The code is working well, but I'm getting the following error: How do I get rid of this error message or better yet, optimize the

Invalid value at 'requests[0].delete_dimension.range.sheet_id' (TYPE_INT32)

与世无争的帅哥 提交于 2019-12-11 04:39:36
问题 I am using Google spreadsheets API v4. I want to delete some rows via python script. i tried their example code and i got the following error Invalid value at 'requests[0].delete_dimension.range.sheet_id' (TYPE_INT32) my code: batch_update_spreadsheet_request_body = { "requests": [ { "deleteDimension": { "range": { "sheetId": sheetId, "dimension": "ROWS", "startIndex": 0, "endIndex": 3 } } }, { "deleteDimension": { "range": { "sheetId": sheetId, "dimension": "COLUMNS", "startIndex": 1,

This add-on has created too many time-based triggers in this document for this Google user account

ぃ、小莉子 提交于 2019-12-11 04:07:36
问题 I get the error as in title - This add-on has created too many time-based triggers in this document for this Google user account When I run the add-on. The add-on is for creating time triggers. I have created together of 7 triggers in 3 documents. Now I can't create new trigger in any documents. ScriptApp.newTrigger("function") .timeBased() .atHour(5) .everyDays(1) .create(); 回答1: When calling a function that creates a new trigger, it is always a good idea to delete all the existing triggers

Default cell values when Inserting new row in Google Sheets

穿精又带淫゛_ 提交于 2019-12-11 03:48:28
问题 In Google Sheets, I would like to "Insert 1 row above/below" and have certain cells in this new row to have default values. For example, when a new row is added, the cell in column C for this row will have the letter "N", column G will have a "Y", and column T will have a formula of "=sum(A2+B2)" - of course the A2 and B2 will need to reflect the number of this new row. What I have so far: function addRow() { var sheet = SpreadsheetApp.getActiveSheet(); var cell = sheet.getActiveCell(); var

Updating cell values with formulas results in apostrophe prefixes with Sheets API

不羁的心 提交于 2019-12-11 02:42:08
问题 Right now, I'm using gspread and the Google Sheets API to update cell values, setting cell.value equal to a string of a specific formula. Example code: # Calculates sum of cells in current row from column B to H G_SHEETS_ROW_SUM_COMMAND = '''=SUM(INDIRECT(CONCATENATE("B",ROW(),":H",ROW())))''' for cell in cell_list: cell.value = G_SHEETS_ROW_SUM_COMMAND When my spreadsheet is populated, however, my command is prefixed with an apostrophe (presumably to keep the cell from being interpreted as a