Output un excel

Hi, after I run the experiment I get an empty Excel data file.

How can I get the output in the Excel data file when the participant fill an input?
For example, if in response to a question the participant checks option number 2 by pushing the 2 button on the keyboard.

Thanks

We need more information about your experiment to answer your question:

  • Are you talking about a lab-based or an online study?
  • Do you collect your responses with a keyboard component or custom code in a code component? If you’re using a code component, what is your code?

For a lab-based study have a look at the documentation of psychopy.data.ExperimentHandler.addData()

If you use a keyboard component it will happen automatically.

If you use a code component of something like keys=event.getKeys() then you will need to add data manually using something like

if len(keys):
     if '2' in keys:
          thisExp.addData('keyPressed','2')

or

if len(keys):
     thisExp.addData('keyPressed',keys[0])