google-spreadsheet-api

How to get the onEdit event to to be caught in a Google Apps Script when editing a spreasheet via api?

走远了吗. 提交于 2019-12-04 14:39:33
I have an apps script that captures the onEdit event when I edit a certain Google Spreadsheet cell manually, and applies various formatting changes based on the change. However, when I edit the same cell using the Google Drive API, the script doesn't seem to run. Is there some way to trigger an event via the api which can be caught by the apps script? Or some other solution for this? Publish as a web app: it is possible to trigger Google apps script code using a URL, i.e. from the Google apps script editor Menu->publish->Publish as web app. You can then pass the id of the cell as a parameter

Capture onClose event for Spreadsheet App Modal Dialog in Google Apps Script

你。 提交于 2019-12-04 12:51:37
I want to do something when the Modal Dialog (opened using showModalDialog() ) is closed from the Spreadsheet App. However I cannot find the reference of such event, in the API documents provided by Google. I found how to capture this event in a Alert Box , and by using this piece of code I can capture how the user closed the Alert Box, but I cannot use this in a Modal Dialog or a Modeless Dialog. Is there a way to do this? Please kindly answer if you do. This is not possible. And you should write your script in a way that this does not matter. For example, by showing a big action button in

Java | How to find a value (row and column number) in range of google spreadsheet using API?

馋奶兔 提交于 2019-12-04 06:09:44
问题 I am using the Java API (V4) to read and edit the data from a google sheet. So far, I am able to read and edit the data based on the row and column number (index). What I am want to do is to localise a data by its specific value ( I want to get the row and the column number of a specific cell using its value). So far this is a part of the working code I used to edit the data: // Copy the format from A1:C1 and paste it into A2:C5, so the data in // each column has the same background. requests

Extend Google Spreadsheets UI with a Google Web App

大憨熊 提交于 2019-12-04 03:54:22
问题 I created a script for Google Spreadsheets, this script just adds a new menu item as described here Custom Menu Items in a Spreadsheet. Then I deploy this script as a Web App and I want all users who install the app to be able to see the new menu item. And I'm stuck at this point. As I understand, when you deploy a script as a Web App, onOpen functions looses it's meaning. So, inside doGet I create custom trigger for onOpen event, attach myOnOpen handler to it and inside myOnOpen I add a menu

CORS preflight fails when writing to Google Spreadsheet API

删除回忆录丶 提交于 2019-12-03 21:57:41
I'm working on a JS application that uses Google spreadsheets. I access them via the REST interface using OAuth authorization, and all is well and good when I stick to GET requests used for reading. I'd like to add a new worksheet using the API shown in the docs . This requires a POST request with the rather strange Content-type: application/atom+xml , which I do like this (JQuery): $.ajax("https://spreadsheets.google.com/feeds/worksheets/{{key}}/private/full", { type: "POST", contentType: "application/atom+xml", headers: { Authorization: "Bearer" + token }, data: data }); This makes Chrome

Google Calendar App Script to pull Data into a Spreadsheet periodically

爱⌒轻易说出口 提交于 2019-12-03 20:33:44
I've been using this script to pull Data from Google Calendar into a spreadsheet. I have a couple questions for improvements: Is it possible to have this pull data from multiple calendars to the same spreadsheet without them overwriting each other? Is it possible to have it add a new column of data to the spreadsheet that marks which calendar each row came from? Also, how would you go about setting this up to run automatically every 24 hours? THANKS! function caltest3(){ var ss = SpreadsheetApp.openById("SPREADSHEET ID"); SpreadsheetApp.setActiveSpreadsheet(ss); var cal=CalendarApp

Writing to Google Docs Spreadsheet using PHP

感情迁移 提交于 2019-12-03 12:59:58
问题 Is there anyway I could write data to a Google Docs Spreadsheet using PHP, besides the Zend library? I have tried the Zend library, and while it is helpful, I want to be able to specify a specific row and column to write to, instead of writing to the last row of the specified column. From what I have seen, the Zend library is not capable of this. Any links or code would be greatly appreciated! 回答1: The Zend library should be able to edit the contents of a given cell within the spreadsheet.

Browser Pop up in Google Apps Script

谁说我不能喝 提交于 2019-12-03 10:13:42
Background: I have prepared a form in HTML Service in Google apps script which I call with DoGet function from Code.gs. my doget function function doGet() { return HtmlService.createTemplateFromFile('HTMLUI').evaluate(); } Once published it presents a simple browser form with some labels, input box, submit, reset and find buttons on it. The user(s) will input information click submit and the data will get stored in a spreadsheet (background). - Working fine till here. Now when the user clicks find button - a popup kind of window needs to populated, in this popup user can enter information

Trying to post data from Google Spreadsheet to a external Api

柔情痞子 提交于 2019-12-03 09:07:58
I'm using Google SpreadSheet and IFTTT to do a DB Call Log of my phone, this is working perfect. Now I'm trying to populate a form in a web page by API from this DB Call Log. I would like to send lastRow to my API every time IFTTT populate the Sheet. The first Row in the Sheet is populated with headers name: departament, first_name, last_name, email, phone, deadline. So i manage to send data to API like this: function myFunction() { var data = { 'department': 1, 'first_name' : 'Test', 'last_name' : 'test', 'email' : 'email@gmail.com', 'phone' : ["0700000000"], 'deadline' : '2017-04-10T00:00' }

How to update/write data to google spreadsheet api android (api v4)

耗尽温柔 提交于 2019-12-03 08:56:36
I have been working on an application where I need to write and update data to a spreadsheet using google spreadsheet api. I have followed the Android Quickstart provided by google Google Sheets API Android Quickstart and was able to retreive data from the google spreadsheet but I am not able to understand how to write data. Please help If you followed the Quickstart tutorial correctly, then it you are few steps from learning how to write data. In the code provided in the Quickstart tutorial, change the line private static final String[] SCOPES = { SheetsScopes.SPREADSHEETS_READONLY }; to: