javascript - How can I retrieve info with UrlFetchApp.fetch using Google Apps Script -
i have question. coded piece of google apps script, i´m not getting result i´m waiting for
function getdatafromquery(myid){
var data; var sqlslect = encodeuricomponent("select a, b, c, d, e, f, g, h, i, j, k ="+myid+" "); try{ var fullquery = "https://docs.google.com/a/google.com/spreadsheets/d/my_google_spreadsheet_id/gviz/tq?tq="+sqlslect+"&gid=the_sheet_where_info_is"; logger.log("<full query> "+fullquery); data = urlfetchapp.fetch( "https://docs.google.com/a/google.com/spreadsheets/d/my_google_spreadsheet_id/gviz/tq?tq="+sqlslect+"&gid=the_sheet_where_info_is"); logger.log("<result> "+data.getcontenttext()); } catch (e) { logger.log("< error > " + e.tostring()); } return data;
}
¿does can give me idea happening?
thanks attention!
Comments
Post a Comment