How to pull data from google spreadsheet to a website?

10,048

Using Tabletop library https://github.com/jsoma/tabletop you can do:

<script type="text/javascript">
  window.onload = function() { init() };

  var public_spreadsheet_url = 'https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AmYzu_s7QHsmdDNZUzRlYldnWTZCLXdrMXlYQzVxSFE&output=html';

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

  function showInfo(data, tabletop) {
    alert("Successfully processed!")
    console.log(data);
  }
</script>
Share:
10,048
Andrew Anderson
Author by

Andrew Anderson

Updated on June 26, 2022

Comments

  • Andrew Anderson
    Andrew Anderson almost 2 years

    There is a publicly shared google spreadsheet with price data.

    There is a query language and we can pull specific data from it, e.g. putting this query into browser address field. In such a way we get the price of the first item.

    Which are the possible no big fuss ways to insert it in the definite place of definite webpages?

    Is it true that only javascript/jquery can make this work?