jsoma / tabletop

Tabletop.js gives spreadsheets legs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update the README.md

hugolpz opened this issue · comments

Hello there,

The section #Getting Started is misleading, giving incorrect information on which key or url to look for.

Current README.md

It recommend :

"In Google Docs, then go up to the File menu and pick Publish to the web. Fiddle with whatever you want, then click Start publishing. A URL will appear, something like https://docs.google.com/spreadsheet/pub?hl=en_US&hl=en_US&key=0AmYzu_s7QHsmdDNZUzRlYldnWTZCLXdrMXlYQzVxSFE&output=html

Copy that! In theory you're interested in the part between key= and & but you can use the whole thing if you want.

screenshot from 2016-12-05 15-54-38

Which is incorrect, misleading and failing.

screenshot from 2016-12-05 16-22-20

With the errors :

Unexpected token I in JSON at position 0
Uncaught TypeError: Cannot read property 'feed' of undefined

The issue

As of 2016/12 and for about 2 years at least, Google provides 2 groups of urls for a same Google sheet.

File > Publish to the web VS Share provide differents urls.

screenshot from 2016-12-05 15-53-10
screenshot from 2016-12-05 15-54-10

Fix

Update the README.md, suggest to :

  1. File > publish to the web : to make your file available
  2. Click on Share button, share to the web AND pick the key from the url provided there.

screenshot from 2016-12-05 16-20-38

I understand how that could be frustrating! Unfortunately I've spent the past hour publishing spreadsheets from a half-dozen Google accounts - personal, organizational, US, European - and for some reason I just can't reproduce it.

If you look at your "Publish to the web" url it has a /d/e/ in it - all of the ones I can produce just have a /d/ in them. I'm wondering if it has to do with your organizational account? If you check the "Require viewers to sign in..." box, does it still have /d/e/ in it?

Either way, it's good to know that the "Share" url works even if the Publish to web one doesn't. I'll definitely make a note in the README about that.

Ok. Thanks for your answer.
There is something interesting. Following your answer, I went again to check out my spreadsheet, and, oh wonder....

screenshot from 2016-12-09 13-07-49

Content of File > publish to the web, the url, has now changed to the right key. See yesterday screenshot, check out the visible File > publish to the web key (different) for the same file (url bar).

Note:
I made initial test and fails right after publishing on the web. It is possible that the File > publish to the web url need to close hard reload the page so the key is updated.