-
Notifications
You must be signed in to change notification settings - Fork 664
Google Spreadsheets
agershun edited this page Feb 26, 2015
·
5 revisions
#Google Spreadsheets
You an use Alasql with Tabletop library to read data from Goggle Spreadsheets:
First, add Alasql and Tabletop libraries to your page:
<script src="https://cdn.rawgit.com/jsoma/tabletop/master/src/tabletop.js"></script>
<script src="http://alasql.org/console/alasql.min.js"></script>
<div id="res"></div>
Second, publish spreadsheet file at Goggle Drive (in case of problem read this StackoOverflow issue). Copy received access file key to the program.
var url='https://docs.google.com/spreadsheets/d/12VlQDuE1hgArpsJFBHlVbe4XN3CX5qwHvo-58ClMGzU/pubhtml';
Third, use TABLETOP() from-function like in the example below:
alasql('SELECT * INTO HTML("#res",{headers:true}) FROM TABLETOP(?)',[url]);
TABLETOP() function has only one parameter: Google Spreadsheet key.
SELECT * FROM TABLETOP("https://docs.google.com/spreadsheets/d/12VlQDuE1hgArpsJFBHlVbe4XN3CX5qwHvo-58ClMGzU/pubhtml")
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo