How to load conditions from excel in PsychoJS?

Url (no credits assigned yet) : https://pavlovia.org/run/G4ABM/testtest/html/

Description of the problem:
Hi! I have a task in which I store my conditions in an excel file, then randomize them at the beginning of the experiment to run it. I am trying to load the excel file at the beginning of my experiment in Psycho JS. I compile directly on pavlovia so everything is synced online. The excel file is correctly synced and the path is ok. I’m using a trial handler:

trials = new TrialHandler({
        psychoJS: psychoJS,
        nReps: 1, method: TrialHandler.Method.SEQUENTIAL,
        extraInfo: expInfo, originPath: undefined,
        trialList: 'stimuliExcel.xlsx',
        seed: undefined, name: 'stimuliExcel'
    }); 

However, I get the following “unknown ressource” error each time I try to launch the experiment :

  • when importing condition: stimuliExcel.xlsx
  • when getting the value of resource: stimuliExcel.xlsx
  • unknown resource

What could be done to resolve the problem?

You can find the excel file i’m trying to open here : stimuliExcel.xlsx (11.2 KB)

Thank you for your help!

It could be because the cursor is on column F, which isn’t within your data.

You should also start your code with stimuliExcel= instead of trials=

Based on your post, I’m assuming that you have checked that the Excel file is in html/resources online.

Best wishes,

Wakefield

Thanks a lot for your help, it works great !