How to write the generated stimuli into an excel spreadsheet using javascript in the online experiment?

There isn’t (yet) a way to save a custom spreadsheet on the fly in an online PsychoPy experiment.

However, all you need to do to minimise changes is to have a code component at the start of your loop that reads the values from the list into the variable names you used offline.