Exception if opening workbook with unicode in formula

Issue #506 resolved
Arne Gellhaus
created an issue

Exception: TypeError: expected <type 'str'>

Could be fixed changing openpyxl\formatting\rule.py

class Rule(...):
    formula = Sequence(expected_type=str)


class Rule(...):
    formula = Sequence(expected_type=basestring)

Comments (4)

  1. CharlieC

    Thanks for the report. Actually, you can't use basestring either because it's Python 2 only. Do you have a snippet with a relevant formula that could be used for a test.

  2. Log in to comment