javascript - How to get a GoogleScript API Example working -


i'm trying google api example working within google script, after few weeks did not succeed. tried following example google's site: https://developers.google.com/google-apps/spreadsheets/

code.gs

    function doget() {      return htmlservice.createhtmloutputfromfile('index')       .setsandboxmode(htmlservice.sandboxmode.iframe)       evaluate;    } 

index.html

<!doctype html> <script> import com.google.gdata.client.spreadsheet.*; import com.google.gdata.data.spreadsheet.*; import com.google.gdata.util.*;  import java.io.ioexception; import java.net.*; import java.util.*;  public class myspreadsheetintegration { public static void main(string[] args) throws authenticationexception, malformedurlexception, ioexception, serviceexception {  spreadsheetservice service =     new spreadsheetservice("myspreadsheetintegration-v1");  // todo: authorize service object specific user (see other sections)  // define url request.  should never change. url spreadsheet_feed_url = new url( "https://spreadsheets.google.com/feeds/spreadsheets/private/full");  // make request api , spreadsheets. spreadsheetfeed feed = service.getfeed(spreadsheet_feed_url, spreadsheetfeed.class); list<spreadsheetentry> spreadsheets = feed.getentries();  // iterate through of spreadsheets returned (spreadsheetentry spreadsheet : spreadsheets) { // print title of spreadsheet screen system.out.println(spreadsheet.gettitle().getplaintext());    }  } } </script> 

please can tell me if example can or can't work within google script? if can, have working?


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -