I'm trying to read the info from a GoogleSheets with TableTop

I was able to have this done as far as my GoogleSheets is from a personal 
account and I make it public.

However, if I'm trying to access to a document from a company account 
(event I made the document public) I'm having an error.

I'm guessing I need some type of Authentication to get the data from the 
document but have not clue how to do that.

Any help would be highly appreciated. 

I'm including the whole code below but my guess is that what it needs to be 
added for Authentication has to be done within the few next lines

THANKS!!!!


 var public_spreadsheet_url = 
'https://docs.google.com/a/bbva.com/spreadsheets/d/1ynZQBIvaR6B1BokXke-mA62g5Oe3eRECugy2zV_JOj4/pubhtml?gid=1727641883&single=true';

  function init() {
    Tabletop.init( { key: public_spreadsheet_url,
                     callback: showInfo,
                     simpleSheet: true } )   




All Code



<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi";
></script>
    <script type="text/javascript" src="tabletop.js"></script>
    <script type="text/javascript">
      google.load("visualization", "1.1", {packages:["table"]});
      




  window.onload = function() { init() };


  //var token = gapi.auth.getToken().access_token;
  var public_spreadsheet_url = 
'https://docs.google.com/a/bbva.com/spreadsheets/d/1ynZQBIvaR6B1BokXke-mA62g5Oe3eRECugy2zV_JOj4/pubhtml?gid=1727641883&single=true'
;


  function init() {
    Tabletop.init( { key: public_spreadsheet_url,
                     callback: showInfo,
                     simpleSheet: true } )   


  }


  function showInfo(data, tabletop) {
    console.log(data);


    var i =0;
    var valorSystems = data [i].Systems;


    do {
        var x = document.getElementById("SelectSystems");
        var option = document.createElement("option");
        option.text = valorSystems;
        option.value = valorSystems;
        x.add(option);
        i++
        valorSystems = data [i].Systems;
        }
  
    while (valorSystems != '');


}






 </script>
  </head>
  <body>
   <select id="SelectSystems">




   </select>
  </body>
</html>








-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/d2f4415b-7319-4160-bcdd-a297fcb77e13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to