3

We have been using Tabletop for a couple of projects as a simple way of accessing small amounts of data from Google Sheets.

Here is the example code from the Tabletop.js Github ReadMe:

function init() {
  Tabletop.init( { key: 'https://docs.google.com/spreadsheets/d/0AmYzu_s7QHsmdDNZUzRlYldnWTZCLXdrMXlYQzVxSFE/pubhtml',
    callback: function(data, tabletop) { 
      console.log(data)
    },
    simpleSheet: true } )
}
window.addEventListener('DOMContentLoaded', init)

Here is my example data source: https://docs.google.com/spreadsheets/d/1atRxZ4IgQPo5z5-DV7okHdtml8e3VdPjpuiEhwvU8FI/pubhtml

But when I try to execute this test code: https://jsfiddle.net/BaronGrivet/oqnx2sjc/

<div id="data">
<strong>Data should appear here: </strong>
</div>

function init() {
Tabletop.init( { 
  key: 'https://docs.google.com/spreadsheets/d/1atRxZ4IgQPo5z5-DV7okHdtml8e3VdPjpuiEhwvU8FI/pubhtml',
  callback: function(data, tabletop) { 
    console.log(data)
    document.getElementById('data').innerHTML += data
  },
  simpleSheet: true } )
}
init()

The following error appears in Console:

Failed to load resource: the server responded with a status of 500 () https://spreadsheets.google.com/feeds/worksheets/1atRxZ4IgQPo5z5-DV7okHdtml8e3VdPjpuiEhwvU8FI/public/basic?alt=json

And loading https://spreadsheets.google.com/feeds/worksheets/1atRxZ4IgQPo5z5-DV7okHdtml8e3VdPjpuiEhwvU8FI/public/basic?alt=json brings up "Internal Error"

I realise this means there is an error at Google's side - but I don't know if this is an error that is going to get fixed, or a permanent change in services that either needs a change in Tabletop, or has stopped the option to access JSON altogether.

Has anyone else come across this issue & found a solution?

BaronGrivet
  • 4,364
  • 5
  • 37
  • 52
  • 2
    Recently, I noticed that when I access to ``https://spreadsheets.google.com/feeds/...`` of the public Spreadsheet, ``Internal Error`` is returned. I'm not sure whether this is a temporal situation. But I thought that this situation might be the same with you. In order to avoid this, I used the following endpoint. ``https://docs.google.com/spreadsheets/d/{fileId}/gviz/tq?gid={sheetId}&tqx=out:json`` and ``tqx=out:csv``. But I think that in this case, ``tabletop.js`` cannot be used. So it is required to parse the retrieved values. I apologize that in my proposal, ``tabletop.js`` cannot be used. – Tanaike Apr 30 '19 at 01:46

1 Answers1

1

Best to follow Google's Issue Track at https://issuetracker.google.com/issues/131613284