@pinar, you will not be able to import Python libraries in the JS code, so you will need a different solution. The easiest option would be to use the PsychoJS trialHandler to load your excel sheet. E.g.,
trials = new TrialHandler({
psychoJS: psychoJS,
nReps: 1, method: TrialHandler.Method.RANDOM,
extraInfo: expInfo, originPath: undefined,
trialList: 'conditions.xlsx',
seed: undefined, name: 'trials'
});
trialList = trials.getTrialList()
This will return a list of JS objects (equivalent a list of Python dicts) and you can iterate through the list to get the column values. E.g.,
trialList[0]['myColumnHeader'] // row 1
trialList[1]['myColumnHeader'] // row 2