google-spreadsheet-api

display the content of a google sheet cell in a web page

自闭症网瘾萝莉.ら 提交于 2019-12-23 02:31:28
问题 I have google sheet with a cell containing html code. I would like to know the best way to show this html in a webpage. I have tried with google spreadsheets API and google visualization API... 回答1: Using Google Apps Script, this can be as simple as: function doGet() { var spreadsheet = SpreadsheetApp.openById("0Aq4s9w_HxMs7dFVuQ0hDaWl1VVZsQ1RBTVZqM0dHLXc"); // replace with your sheet id var html = spreadsheet.getRange("A1").getValue(); // My html is in cell A1 return HtmlService

How to upload a file to Google Drive using Service Account in PHP?

半腔热情 提交于 2019-12-22 22:46:09
问题 Quickstart: Run a Drive App in PHP seems to be using an outdated version of [google-api-php-client][2], also it doesn't provide example on how to upload a file using Service Account. In my project I'll need to add a file (spreadsheet) using Service Account, add a spreadsheet, share the spreadsheet with another user and add rows to the spreadsheet. I'm able to get an empty list of spreadsheets, but I couldn't figure it out how to upload a file using Service Account. The PHP Class google-api

How to create a list range validation using the Android Google Spreadsheet API

拈花ヽ惹草 提交于 2019-12-22 13:08:34
问题 I am creating an android application that creates a new Spreadsheet in Google Drive and inserts some data inside. Currently I can insert free Text and Formulas, but I need to add some specific validations and specifically a drop down list with predefined values. The expected result should be something like this: I am using this code: SpreadsheetFeed feed = spreadsheetService.getFeed( FeedURLFactory.getDefault() .getSpreadsheetsFeedUrl(), SpreadsheetFeed.class); // Creating the list of

How to create a list range validation using the Android Google Spreadsheet API

喜夏-厌秋 提交于 2019-12-22 13:08:09
问题 I am creating an android application that creates a new Spreadsheet in Google Drive and inserts some data inside. Currently I can insert free Text and Formulas, but I need to add some specific validations and specifically a drop down list with predefined values. The expected result should be something like this: I am using this code: SpreadsheetFeed feed = spreadsheetService.getFeed( FeedURLFactory.getDefault() .getSpreadsheetsFeedUrl(), SpreadsheetFeed.class); // Creating the list of

Google spreadsheets API C# missing resource version id on batch update

邮差的信 提交于 2019-12-22 10:28:36
问题 I'm trying to batch update the empty cells using the spreadsheets api C# v2.2.0.0 this way: foreach (var csvline in csv) { var csvlineParsed = csvline.Split(';'); for (uint index = 0; index < csvlineParsed.Length; index++) { var cellEntry = new CellEntry(i, index + 1, csvlineParsed[index]); cellFeed.Insert(cellEntry); var cell = new CellEntry(i, index + 1); cell.Id = new AtomId(string.Format("{0}/{1}", cellFeed.Self, "R" + i + "C" + index + 1)); cell.InputValue = csvlineParsed[index]; cell

Add multiple rows to Google Spreadsheet via API

不羁岁月 提交于 2019-12-22 09:23:51
问题 I can add a new row to a Google spreadsheet with this code: $valueRange = new Google_Service_Sheets_ValueRange(); $valueRange->setValues(["values" => ['data1', 'data2']]); $range = 'Sheet1!A1:A'; $conf = ["valueInputOption" => "USER_ENTERED"]; $service->spreadsheets_values->append($spreadsheetId, $range, $valueRange, $conf); How should I change the setValues params to add multiple rows? Thank you. UPDATE In the meantime I use this approach: $range_number = 1; // Keep spreadsheet header $data

Ajax calls made from Google Spreadsheet Custom Function

非 Y 不嫁゛ 提交于 2019-12-22 04:56:31
问题 Hey guys have anyone of you ever tried to write a script inside a Google Spreadsheet to make an ajax call to a website. I want to make it so that the spreadsheet updates itself from the website. But after just putting this short block of code, I get thrown an error: "ReferenceError: "XMLHttpRequest" is not defined." Any help guys? Do I have to call a certain library? xmlhttp=new XMLHttpRequest(); xmlhttp.open("GET", eventObject[1], true); xmlhttp.send(); 回答1: Google Apps Script does not

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

ⅰ亾dé卋堺 提交于 2019-12-21 20:22:19
问题 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. 回答1: This is not possible. And you

Trying to post data from Google Spreadsheet to a external Api

纵饮孤独 提交于 2019-12-21 03:18:21
问题 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

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

a 夏天 提交于 2019-12-18 19:06:09
问题 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 below: discoveryUrl = ('https://sheets.googleapis.com/$discovery/rest?' 'version=v4') service = discovery.build('sheets', 'v4', http=http, discoveryServiceUrl=discoveryUrl) spreadsheetId = '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms' rangeName =