this is just the relevant parts of what i have set up.
i have two spreadsheets - i want to use tabletop and then:
-
have one spreadsheet's data fill one div (instagram)
-
have the other spreadsheet's data fill the other div (readPocket)
right now, even though the spreadsheets have different filenames, worksheet names and column headers, it still won't correctly fill the divs when the two sheets' data are lumped together.
i think i need to filter them back apart and then fill the divs but i'm having trouble doing that.
this is all started because I was like, "ooh want can i do with all the stuff ifttt.com will put into a spreadsheet!
// something like this?
var myJS = {};
var a = {};
var b = {};
var localData = {};
window.onload = function() {
myJS.loadSpreadsheets();
};
myJS.loadSpreadsheets = function() {
var URL = 'https://docs.google.com/spreadsheet/pub?key=0Ao5u1U6KYND7dGRZbTUwd3JQZ1k3OE9KTVZqZUYwZHc&single=true&gid=0&output=html';
var URL2 = 'https://docs.google.com/spreadsheet/pub?key=0Ao5u1U6KYND7dERheVpFZThEUkdPZnFXXzMxTzJ3dEE&single=true&gid=0&output=html';
var a = Tabletop.init( { key: URL, callback: myJS.showDataA, simpleSheet: true } )
var b = Tabletop.init( { key: URL2, callback: myJS.showDataB, simpleSheet: true } )
};
myJS.showDataA = function(data) {
console.log(data);
var data = data;
localData.a = data;
// Do things to output…
};
myJS.showDataB = function(data) {
var data = data;
localData.b = data;
console.log(localData);
// Do things to output…
};