Excel 2 Storyline

I have created a script with which you can import data from xlsx files.

I use it to create questions within Storyline. So if a question changes I only have to manipulate the xlsx file and do not need to publish all again.

The questions, the answers and the correct answer comes from a xlsx file.

Working demo can be found here: excel2storyline

Download the project file here: .story file

Download the test Excel file here: test.xlsx

Download the JS libraries here: JS libraries

Download the script itself:  script.js

If you need futher information just ask.

 

Have fun!

17 Replies
Julia Tan

Hi Christoph,

I am trying to run your demo on my local pc but the questions text are not displayed. All blank.

I have no issue if running here. May I know what has went wrong? 

As I couldn't preview from articulate, I publish it and run through C:\inetpub\wwwroot\excel. i have pasted the xlsx file into the folder too. 

Office online plugin not installed too.

By the way, where should I place the script files? 

Thanks!

Matthew Bibby

Hi Julia,

Because Christoph's demo uses JavaScript, you'll need to upload the published output to your LMS or server for it to work properly. If you don't have access to one, you can use Tempshare.

Alternatively, the JavaScript should run on your local machine if if you access the HTML5 output (by launching the story_html5.html file rather than the story.html one).

Julia Tan

Hi Matthew,

Will it works if I am using Internet Information Services (IIS) Manager to test? 

I publish it and copy it onto C:\inetpub\wwwroot\excel. Then on chrome, I enter "http://localhost/excel/story.html"

It seems that XLSX.read(btoa(arr), {type: 'base64'}) didn't not exit. What can be the reason?

Thanks!

Christoph Krieger

Thank you Matthew for jumping in and thank you Julia for trying my example.

I use as testing enviroment XAMPP and a Linux based Webserver.

But my LMS is runnuning on a  Microsoft-IIS/7.5 Webserver and it works there flawlessly.

As I am not a Windows Server expert I am sorry that I can not help you any futher with that issue.

Do you have a detailed error log or something else?

Christoph Krieger

Once again. 

You said you republished the project and copied the xlsx file

 

  • Have you also copied the scripts folter to it?

  • Have you also added these lines into the header of the story.html and  story_html5.html files?

<script src="scripts/jszip.js"></script>
<script src="scripts/xlsx.js"></script>
<script src="scripts/shim.js"></script>

Danielle Delgeras

Perhaps you could create a nice little e-course on how to implement this script ;-) But in all honesty, I find xlsx scripts a bit tricky. I'm going to try this sometime this week, but I expect to run into troubles with it. 

Does anyone else get an error message when clicking on the Tempshare link above? I get an access denied error:

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>E590261BBAE3AEE9</RequestId>
<HostId>
gcSUOpX34T6JKLU5uTLketOSaKM/191wFpUkx+KurYVbl7vtm+V9SuxMZcWlpPPaeaWWf2MiuG0=
</HostId>
</Error>

Not really sure why.  

Christoph Krieger

You are right Danielle.

Sometimes it is tricky like everything which depends on different Server and Browser technology.

I will create a littte howto in future when I have a bit more time. It is always difficult to use Scripts if you are not experienced with coding at all. It is for sure not a solution for everyone's need.

Julia Tan

Hi Christoph,

Thanks alot. After adding the 3 lines into the 2 files, it works. :)

Meaning every time I republish, I need to add these 3 lines. Can foreseen that the designing stage will take a very long time as I couldn't preview it on Articulate directly. But at least it works... :)

By the way, if I have published the content as LMS with SCORM compliance, will it affect the SCORM compliance if I will to modify the text in xlsx offline? And run it without republishing.

Thanks!

Julia Tan

Hi Christoph,

I have tried to download the content (story.html) onto Articulate Player on my Mobile phone. 

The text didn't show out again. Should it be working fine on mobile / tablet? I have manually copied the scripts folder and text.xlsx file into the respective IOS player folder. But still failed.

Did I copy it wrongly?

Thanks alot!

Vinamra Mehmi

Hi Christoph,

I tried your solution with Storyline 360, but it didn't work. It gives me the following error in console log:

ReferenceError: XLSX is not defined for the following line

process_workbook(XLSX.read(btoa(arr), {type: 'base64'}));

Could you please help me with this? The solution is working fine with Storyline 2.

 

julien Daddy

hi',

This project is wonderfull, but... how can i have the same thing, but with columns, not line in Excel ? (better to use in excel)

like in my picture :

question     how much ?

answer1     10

answer2      20

i try to change your script but... it don't work ! 

thanks !