3

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?

Andrew Anderson
  • 1,044
  • 3
  • 17
  • 26
  • There has came an answer which suits me best: to insert it through iframe. http://jsfiddle.net/Usermane/6v4xp46u/ But how to make it look better: put it in the center of some area of the webpage, change font, change cell background color etc. I don't want to make any scripts: PHP, Python etc. – Andrew Anderson Aug 31 '15 at 10:54

3 Answers3

2

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>
Juan Girini
  • 1,150
  • 2
  • 16
  • 31
1

Export the content to excel and import it into a SQL database.

You could do it with any language. PHP for example.

0

If you are working in Python, there is a library called Copytext that allows you to turn a spreadsheet into a native python object. You'd first have to fetch the spreadsheet, pass it to copytext, extract data of interest, then finally render it to your web page.

But this question has also been addressed here.

Community
  • 1
  • 1
scuerda
  • 525
  • 3
  • 12