I tried to load a sheet from an Excel Macro-Enabled Workbook (.xslm) for “Conditions” in the Builder. But It is mentioned the following: “No parameters set (conditionsFile not found)”. It only works when I have the same sheet (without any macros).
My question: is it possible to use a sheet from .xslm (an excel sheet with macros)?
It could be added to a release, but see also the GitHub post and comments by Richard and Jon.
If you want to add the option yourself, there is an easy way to enable to PsychoPy to recognise the .xlsm file, but it involves you tweaking the PsychoPy code. If you are comfortable with that, and are confident the macros are safe in your Excel file, you need to open psychopy/data/utils.py and goto line 273. This should have the following conditional:
if fileName.endswith('.csv') or (fileName.endswith(('.xlsx','.xls'))
and haveXlrd):
If you want to have xlsm files recognised, change this line to the following:
if fileName.endswith('.csv') or (fileName.endswith(('.xlsx','.xls','.xlsm'))
and haveXlrd):
If you are using the standalone version, you probably do not have permission to change the file in place. So, to get around this, copy the file to desktop, change the file, and paste the file back in the original location.
Thanks dvbridges. My apologies for the “silly” question but how can I open psychopy/data/utils.py? (i.e.,location). Yes I use the standalone version (for Mac).
No it is not a silly question, I nearly put that info in but chose not to If you are using a Mac, perhaps you have BBEdit? Open the file with BBEdit, or some other text editor.
That is the path, so you need to find where your version of PsychoPy is installed, and follow that path toi the util.py file (.py is a Python file extension).
Ok, well if you can wait, then this will be in the next bug fix release (3.0.6) - @jon is making new releases quite regularly whilst we get the PsychoPy 3 running smoothly online, so you should not have to wait too long.
Since you mentioned Mac; just find the psychopy icon in your applications folder, CTRL+click on it and click on “Show Package Contents”. It still takes some navigation from there, but for example my path is /Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/data/utils.py.
Or use the CMD-SHIFT-G shortcut in Finder and paste the path there.