Customize output Excel file in Javascript

Description of the problem: Hi there, I am wondering if it is possible to customize the order of the columns in the Excel results file produced by code when it is on Pavlovia. I have attached two Excel files, one called Python, and one called Javascript. The Python file is ideally how I would like the JS file to look, down to the specific order of the variables. It has the practice trials info, then the real trials info, with the system/participant overall info at the end. In the file produced by Javascript, the order gets totally jumbled. So, is it possible to change the columns and the order they are in from the Javascript code to look? Or change it to at least look kind of similar?

Thanks in advance!

Python.csv (4.7 KB) Javascript.csv (4.7 KB)

Hi There,

Unfortunately you can’t easily customise the saving of default variables in javascript - they will be saved chronologically in time. You can customize the saving of custom variables through by using this line in a code component

thisExp.addData('myColumnheader', myVar)

and adding a code component with code type “JS” to the start of your experiment with this in the begin experiment tab:


Hope this helps,