Formulas don't load in 2.0.4

Issue #349 resolved
AlSweigart
created an issue

In 2.0.3, this would work:

>>> wb = openpyxl.Workbook()
>>> sheet = wb.get_active_sheet()
>>> sheet['A1'] = 200
>>> sheet['A2'] = 300
>>> sheet['A3'] = '=SUM(A1:A2)'
>>> wb.save('writeFormula.xlsx ')
>>> 
>>> wbFormulas = openpyxl.load_workbook('writeFormula.xlsx')
>>> sheet = wbFormulas.get_active_sheet()
>>> sheet['A3'].value
'=SUM(A1:A2)'
>>> wbDataOnly = openpyxl.load_workbook('writeFormula.xlsx', data_only=True)
>>> sheet = wbDataOnly.get_active_sheet()
>>> sheet['A3'].value
500  

However, after upgrading to 2.0.4, when I load a workbook with formulas (both with data_only set to True or False) sheet['A3'].value is None.

This happens on Windows 7 and OS X, on Python 3.

Comments (7)

  1. Log in to comment