html - Individual Google Sheet Cell Value to JavaScript -


i'm trying pull data individual cells in google sheet webpage. far have this:

    function loadprice() {    var url="mygooglesheetslink";    xmlhttp=new xmlhttprequest();    xmlhttp.onreadystatechange = function() {      if(xmlhttp.readystate == 4 && xmlhttp.status==200){        document.getelementbyid("price").innerhtml = xmlhttp.responsetext;      }    };    xmlhttp.open("get",url,true);    xmlhttp.send(null);          }
    <body onload="loadprice()">      <div id="price"></div>    </body>

it pulls sheet page, , i'm trying figure out how can individually place cell values sheet in particular places on page.

thanks in advance!

this updates select options spreadsheet.

google app script:

function getselectoptions() {   sortoptions();   var ss=spreadsheetapp.getactive();   var sh=ss.getsheetbyname('options');   var rg=sh.getdatarange();   var va=rg.getvalues();   var options=[];   for(var i=0;i<va.length;i++)   {     options.push(va[i][0]);   }   return va; } 

javascript:

  $(function() {         google.script.run           .withsuccesshandler(updateselect)           .getselectoptions();       });  function updateselect(va) {   var select = document.getelementbyid("sel1");   select.options.length = 0;    for(var i=0;i<va.length;i++)   {     select.options[i] = new option(va[i],va[i]);   } } 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -