Forum Discussion

DorothyStark's avatar
DorothyStark
Community Member
12 years ago

exporting variables to be read in a Google docs spreadsheet

I've seen Tom's helpful screencast on how to embed a Google docs form into a Storyline project. However, what I want to do is a little different. I'd like to be able to export the values of about a dozen variables from Storyline so I could see them in a spreadsheet the way I would if students entered those values into a Google docs form.

I've got a grammar assessment, and I want to export a student's name and either OK/NEED TO REVIEW/MIGHT WANT TO REVIEW for each of a dozen or so topics. Now, I could just use a final page screen in Storyline showing a student her status on these dozen topics and ask her to fill out an embedded Google docs form in which she basically copies the results manually. These are just initial assessment scores, and I'm not worried about honesty issues. However, this seems like a pretty klutzy way to do things. Would anyone be able to help me out with a suggestion for a better method? I don't know any JavaScript, and my familiarity with Storyline is fairly low.

Thanks!

Dorothy

  • Innowijs's avatar
    Innowijs
    Community Member

    Hi Tracy,

    I've followed your instructions step by step. But somehow it won't work with me.
    For this story module I used Storyline 360 and Google Chrome as browser.

    Could you please help me with this? I've attached the storyline file and a screenshot of how the js is triggered.

  • Hi,

    Is there any code which can store storyline 360 variables like score in excel sheet? Let me know if anyone has done this before.

    Thanks!

  • KengHweeWee's avatar
    KengHweeWee
    Community Member

    I am totally new to html. Can you tell me how to include the latest script version in he story.html?

    Thanks

    • TracyParish's avatar
      TracyParish
      Super Hero
      Keng Hwee Wee

      I am totally new to html. Can you tell me how to include the latest script version in he story.html?

      Thanks

      I've been using this method now without fail.  Just this past fall used it.  I can't remember all the details of my own post that is linked above, but Matthew's method works.  Let me know if you have trouble.

      https://www.youtube.com/watch?v=5V2pvtFGeyY 

      • KengHweeWee's avatar
        KengHweeWee
        Community Member

        Thanks for the reply.

        I follow every step in the instruction but still cannot get the variables
        posted to the Google Sheet.

        Please advise

        Regards

        KH Wee

  • Tracy's links are no longer valid so I'm trying to cobble things together using the YouTube video she links to above. Is there a new "script.src" link we should be using?

     

    • SherriSagers-ca's avatar
      SherriSagers-ca
      Community Member

      I got it to work! Here's the first JavaScript that needs to be executed at the beginning of the Storyline file:

      var head = document.getElementsByTagName("head")[0];
      var script = document.createElement('script');
      script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js';
      script.type = 'text/javascript';
      head.appendChild(script);
      • BeccaLevan's avatar
        BeccaLevan
        Community Member

        Awesome Sherri! Happy you got this to work, and so kind of you to come back and share it with the community!

    • MuhammodAlaa's avatar
      MuhammodAlaa
      Community Member
      Sherri Sagers

      This video by Dmitry M explains another way to export variables from Storyline to Google Sheets. His method requires executing only one JavaScript file: https://youtu.be/g8_Ns6k-K8k 

      It seems this video isn't available anymore :/

      • SherriSagers-ca's avatar
        SherriSagers-ca
        Community Member

        I'm sorry it's gone, Muhammod! I checked and couldn't find it, either. That's really sad because I thought it was an even better solution since it only required one JavaScript file.