Cannot display data from google spreadsheets using html

  1. 2 years ago

    Hi I am new to this site and I am also learning how to make a script. Am only a musician but I get interested when I came across with your sample "upcoming decks list". I made a copy of your spreadsheet exactly what is written in the content which you can find here and your script and html. Below are the codes:

    <!DOCTYPE html>
    <script src=""></script>
    <script>$(function() { alert('hello') });</script>
    <p>&raquo; <a href="" target="_blank">View This Spreadsheet on Google Docs!</a></p>
    <table id="upcoming">
    <th>Deck Name</th>
    <th>File Name</th>
    <th>Deck Maker</th>

    .done( function(data) {
    var ssData = data.feed;
    $.each( ssData.entry, function() {
    // show a checkmark for completed decks
    var complete;
    if ( this.gsx$complete.$t == 1 ) {
    complete = '&amp;#9745;';
    else {
    complete = '&amp;#9744;';
    // create and populate rows
    + '<td>' + this.gsx$deckname.$t + '</td>'
    + '<td>' + this.gsx$filename.$t + '</td>'
    + '<td>' + this.gsx$category.$t + '</td>'
    + '<td>' + this.gsx$deckmaker.$t + '</td>'
    + '<td>' + complete + '</td>'
    + '</tr>'

    When I run this html, the data from the spreadsheet will not display. Only the header. I've read a lot of scripts with similar scenarios but I can't get it. Any help?

    Thank you very much.

  2. Bloo

    7 Apr 2017 Administrator

    Hey @victorsax, sorry for late reply. Did you complete the following steps to allow data sharing on your spreadsheet?

    2. Configuring the Spreadsheet to Allow Data Sharing
    In order for the Google Data API request to work, you must "Publish" your spreadsheet. Navigate to "File" > "Publish to the web..." and click on the "Start Publishing" button.

    You should also check "Automatically republish when changes are made" to ensure that the Google Data API can see any updates that you make to the spreadsheet.

    If that's not the issue, are you seeing any errors in the JavaScript console when you try with your code?

  3. Hey Bloo,

    Thank you very for the reply. I already done my script and found the data displayed already. It now works fine. However, I can't see any sample on how to paginate the page if I have a long data displayed on the screen. Could you please provide a sample with a jquery table.

    Thanks for the help.

or Sign Up to reply!