TypeError raised when try to change the width of column

Issue #1240 open
Stepan Bambula
created an issue

When try to change width of column by command:

from openpyxl import Workbook

wb = Workbook()
ws = wb.active

ws.column_dimensions[1].width = 10

get the following error message:

Traceback (most recent call last):
  File "/home/dx2sery/.PyCharm2018.1/config/scratches/scratch_63.py", line 6, in <module>
    ws.column_dimensions[1].width = 10
  File "/proj/misc/MBtech/user/dx2sery/pycharm/Tools/__venv__/lib/python3.6/site-packages/openpyxl/utils/bound_dictionary.py", line 26, in __getitem__
    setattr(value, self.reference, key)
  File "/proj/misc/MBtech/user/dx2sery/pycharm/Tools/__venv__/lib/python3.6/site-packages/openpyxl/descriptors/base.py", line 44, in __set__
    raise TypeError('expected ' + str(self.expected_type))
TypeError: expected <class 'str'>

Comments (4)

  1. Log in to comment