google-spreadsheet-api

unable to open spreadsheets with Zend_Gdata?

本小妞迷上赌 提交于 2019-12-13 20:14:57
问题 <?php include('Zend/Gdata.php'); include('Zend/Gdata/Spreadsheets.php'); include('Zend/Gdata/ClientLogin.php'); $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient('myemail@gmail.com', 'password', $service); $spreadsheetService = new Zend_Gdata_Spreadsheets($client); $sheets = $spreadsheetService->getSpreadsheetFeed(); foreach ($sheets as $sheet) { //echo get_class($sheet) . '<br>'; exit; echo $sheet->getContent() . '<br>'; echo $sheet->getId

How to get Sheet Name of individual Sheets in Google Spreadsheet - Google Sheet Api v4 - Java

≯℡__Kan透↙ 提交于 2019-12-13 19:21:42
问题 I am trying to get sheet name of individual sheets in Google Spreadsheet using Google Sheet Api v4. I tried the following way that gets the properties: Spreadsheet response1= service.spreadsheets().get(spreadsheetId).setIncludeGridData (false).execute (); System.out.println (response1.getProperties ().getTitle ()); However it displays the name of the actual Spreadsheet rather than displaying the names of individual sheets in the Spreadsheet. Do anyone know how we can go about it? 回答1: Below

Processing apply protection on multiple ranges all together

非 Y 不嫁゛ 提交于 2019-12-13 18:03:32
问题 Recently ability to manipulate protection for a range programatically has been added. But is there a way to add multiple ranges all together when they have same protection to apply protection instead of processing each range one at a time? The following code is from Google sample script. Currently I am running the following code as many as ranges I have. Is there a better way to do it all at once? var ss = SpreadsheetApp.getActive(); var range = ss.getRange('A1:B10'); var protection = range

Updated Google Calendar events from Sheets

若如初见. 提交于 2019-12-13 11:51:49
问题 I am trying to sync a Google Calendar to a Sheet to allow me to easily mass update calendar events from within the sheet, then push all the changes back to the calendar. I'm able to download all the events into my Sheet, specifically using this bit of code: // Loop through all calendar events found and write them out starting on calulated ROW 2 (i+2) for (var i=0;i<events.length;i++) { var row=i+2; var myformula_placeholder = ''; // Matching the "header=" entry above, this is the detailed row

Write data into Google Spreadsheet w/ Java

南楼画角 提交于 2019-12-13 11:34:30
问题 I'm lost on this one. I'm trying to connect Java with Google spreadsheet, and although the API's documentation is complete on retrieving data (and it is working fine), I am unable to figure out how to write into the spreadsheet. Could anyone, please provide a full example (with the necessary imports and all) on how to do a very simple data entry into a Google Spreadsheet (say, enter "asdf" into the A1 cell of Sheet1)? If a tutorial like this exists somewhere, I could not find it - any

Retrieve only specific columns of spreadsheet with zend gdata from gdocs

喜夏-厌秋 提交于 2019-12-13 06:06:25
问题 I am working with relatively large spreadsheets from gdocs and access them via the zend library. I only need certain columns at any given time so in order to save memory it would be helpful to use the list-based feed to only retrieve these certain columns and not the whole spreadsheet. The basic query I am using is according to the zend documentation $query = new Zend_Gdata_Spreadsheets_ListQuery(); $query->setSpreadsheetKey($spreadsheetKey); $query->setWorksheetId($worksheetId); $listFeed =

How can I get active range/selection in Google Spreadsheets when a script is deployed as a Web App?

可紊 提交于 2019-12-13 03:58:46
问题 I found that functions like getActiveRange(), getActiveSelection() work only when a script runs as a Custom Function in Spreadsheets or a Container Extension (see Execution Methods for Scripts). Is my observation correct? Is there any way to deploy script as a Web App, open a spreadsheet using SpreadsheetApp.openById() and get active range/selection, assuming the owner of the spreadsheet has it opened in Drive? The matter is I'm making an extension for Google Spreadsheets, but for building my

gspread/OAuth2: authenticated default gmail account (used early in ClientLogin)

隐身守侯 提交于 2019-12-13 00:47:39
问题 I have been using gspread (authenticated via ClientLogin) for a last year. Now I would like to use OAuth2. I've followed tutorial from gspread site: http://gspread.readthedocs.org/en/latest/oauth2.html The problem is that this method creates new "Email address" (in console.developers.google) which doesn't have an access to spreadsheets - all spreadsheets should be shared again. This is really difficult if you have 1000+ spreadsheets. The question is: how to authenticated with OAuth2 my

Publish Google Sheet document to the web using Google Sheets API

夙愿已清 提交于 2019-12-13 00:36:38
问题 My goal is to publish a Google Sheet document to the web and get the link using Google Sheets API. I managed to publish it using this advice and now it says "published" in File -> Publish to the web tab. However, the link given on this tab is different from the original file id , and I don'k know how to get it with API. 回答1: Unfortunately, the URL of https://docs.google.com/spreadsheets/d/e/### Not fileId ###/pubhtml retrieved when the spreadsheet is published cannot be directly retrieved. At

Cannot read property “length” from undefined. (line 39, file “Code”)

て烟熏妆下的殇ゞ 提交于 2019-12-12 10:27:50
问题 I have written a google Apps Script which is used to filter the data and copy to another sheet. But, Yesterday it was working fine when I open today morning it was showing the error " Cannot read property length from Undefined " onEdt is a user defined function. Don't compare with onEdit() function onEdt( ) { var source = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("data"); var destination = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Crunch2"); var data = source