Hi,
thanks for your question, and sorry for the trouble.
This should be possible in general. This is really only a matter of finding the “correct” link for this from Google Docs. You will basically need a URL that directly gives you the CSV file, without requiring a login to Google Drive or anything like that. I have never needed this myself, so I can’t tell you where exactly you’ll have to look in Google Docs, sorry 🙁
Regards,
Tobias
Thread Starter
Michael
(@taloscent)
Yep. I saw that in another post. That was where I got stuck. Finding the URL for the csv. I don’t think there is one. Looks like I may have to tackle the API. Thanks!
Hi,
yeah, this is definitely not trivial. I vaguely remember that someone managed it somehow, but I can’t find the forums thread 🙁
It might be possible that he didn’t use CSV but maybe XLSX or HTML, which TablePress can also import.
Regards,
Tobias
Thread Starter
Michael
(@taloscent)
Does anyone know how to point to the google sheet json? I have tried
https://spreadsheets.google.com/feeds/list/1nKiYASIMwgvoFqFtXlk4xlPmtUrhi-qJE3V_ocliQlQ/od6/public/values?alt=json
and while it seems this brings up some json data it does not import as a url into tablepress.
Anyone have any idea where to start?
I am able to perfectly import everything from Google Sheets into TablePress, you just need to have the right URL.
Here’s mine:
https://docs.google.com/spreadsheets/d/1nvhgY0zoDi5sATPMPGvdszQi6bSNhTvzfQ-SISiysUQ/export?format=csv
And by example, this would be yours:
https://docs.google.com/spreadsheets/d/1nKiYASIMwgvoFqFtXlk4xlPmtUrhi-qJE3V_ocliQlQ/export?format=csv
You will notice that if you’re not logged into your Google account, it will ask you permission to view that CSV file we just generated. This is because you’re not publishing to the web publicly. You can do this by going to File – Publish To The Web
You will need to do this before you will see successful imports. Good luck!
Thread Starter
Michael
(@taloscent)
well that did it! Thank you. Any idea how to specify a single sheet?
Hi,
very cool! Thanks for sharing this great trick, David!
Great to hear that this is so helpful!
Best wishes,
Tobias
Just an update to this thread: For some reason just clicking on File -> Publish to the Web as suggested by David did not work for me (I still had to login as at Feb 2015 >_<)
However, if “Anyone with the link can view” is enabled, then it is possible to keep the data on Google Sheet/Drive somewhat private, whilst still allowing WP-Cron to do its job via TablePress and import your Google Sheet data.
File -> Share -> Anyone with the link can view
p/s: There is another thread discussing Auto Import that seems to rank higher in search results on the subject, but it is closed to new replies, so hence my response here.
Hi flick,
thanks for the update on this! It’s definitely possible that Google changed how this works in Google Spreadsheets, so your findings will definitely be helpful!
Best wishes,
Tobias