Pulling Google Sheet data into Storyline variables?

Jun 30, 2015

I'm getting some help on this on the side with this, but just wondering if anyone has done this and can provide me with some full code examples that I could then modify for my use. I'm a javascript noob so can't write all my own code at this point, but can probably modify some.

Thanks,

Mike

 

25 Replies
Mike B.

Michael,

I'm including tabletop.js (https://github.com/jsoma/tabletop) into my project and using the following code to pull in data from a sheet which has been published for public access. Please let me know how you make out with this.

var public_spreadsheet_url = 'FullUrlToGoogleSheet';


Tabletop.init( { key: public_spreadsheet_url,
callback: showInfo,
simpleSheet: true } );


function showInfo(data) {
var player = GetPlayer();
player.SetVar("CourseID",data[0].CourseID);
}

Thanks,

Mike

Mark Bennett
Gustavo Angulo

Happy new year everybody.

I work in this solution but I don't achieve to make it work. 

I did include tabletop.js into my project folder and using the following code 

var public_spreadsheet_url = 'FullUrlToGoogleSheet';


Tabletop.init( { key: public_spreadsheet_url,
callback: showInfo,
simpleSheet: true } );


function showInfo(data) {
var player = GetPlayer();
player.SetVar("CourseID",data[0].CourseID);
}

any ideas? Can anybody explain me about "CourseID" ?

David C

Kicking this thread to see if there is still life......

I have made this work pulling a variable from a sheet. I have worked out that the Data[0] is the row from which to pull data [0] being the first row.

Does anybody know how to find a particular part of the table? I.e. if you had a list of names and ID numbers, how can you pull a name from a particular ID number.

I want to pull a name when I enter an ID number

Any ideas?

Gustavo, if you are still there...

"CourseID" is the variable in storyline that you want to populate

Data[0] is the row in the sheet you want the data to come from [0] is the first row

.CourseID is the header of the column of the sheet you want the data to come from.

This discussion is closed. You can start a new discussion or contact Articulate Support.