Skip to content

Commit 7f753f5

Browse files
authored
Excel importConditions(): don't import formulas
In importCondtions() method, added the option "data_only=True" to the call to load_workbook(), so that the that values of a cell, and not the formulas, are imported into psychopy.
1 parent 3009f01 commit 7f753f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

psychopy/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,7 @@ def _assertValidVarNames(fieldNames, fileName):
26672667
raise ImportError('openpyxl is required for loading excel '
26682668
'format files, but it was not found.')
26692669
try:
2670-
wb = load_workbook(filename=fileName)
2670+
wb = load_workbook(filename=fileName, data_only=True)
26712671
except Exception: # InvalidFileException(unicode(e)): # this fails
26722672
raise ImportError('Could not open %s as conditions' % fileName)
26732673
ws = wb.worksheets[0]

0 commit comments

Comments
 (0)