Hello,
I have successfully programmed an experiment that required reading in an excel sheet (I’m unable to do this with the builder due to the nature of the experiment).
In python I was able to use the pandas library to read in an excel sheet and the study works perfectly. However, JS does not use pandas and thus I’m unable to make it online compatible.
What is the JS alternative to using pandas/reading in an excel doc?
Here is the current JS code:
import * as pd from ‘pandas’;
df = pd.read_excel(“fillers.xlsx”);
fillerText = df[“FillerSentence”].tolist();
fillerCorrect = df[“FillerCorrect”].tolist();
nfillerRep = [1, 3, 2, 3, 3, 2, 2, 2, 2, 4, 4, 2, 5, 5, 3, 4, 1, 5, 1, 5, 4, 3, 4, 3, 4, 5, 1, 4, 1, 1, 2, 1];
trialCount = 0;
Math.random.shuffle(fillerText);
Math.random.shuffle(nfillerRep);
currentfiller = 0;
condNumber = Math.random.randint(1, 4);
conditionFile = ((“pt_sentences” + condNumber.toString()) + “.xlsx”);
Any help would be very appreciated:)