Hello All,
I'm new to this forum and relatively new to Python.
I'm trying to run simple script to change the column width and I'm getting
this error message. Could you please advice me where could be the root of
this issue?
import xlwt
wb = xlwt.Workbook()
ws = wb.add_sheet('Account Manager')
ws.write(0,0,'Account Number')
ws.col(0).width = len('Account Number') * 256
wb.save('widthtest.xls')
Traceback (most recent call last):
File "C:/_My Docs/Scripts/Python Scripts/Excel/column_width.py", line 6,
in <module>
wb.save('widthtest.xls')
File "C:\Python27\lib\site-packages\xlwt\Workbook.py", line 657, in save
doc.save(filename, self.get_biff_data())
File "C:\Python27\lib\site-packages\xlwt\Workbook.py", line 642, in
get_biff_data
data = sheet.get_biff_data()
File "C:\Python27\lib\site-packages\xlwt\Worksheet.py", line 1312, in
get_biff_data
self.__colinfo_rec(),
File "C:\Python27\lib\site-packages\xlwt\Worksheet.py", line 1150, in
__colinfo_rec
result += self.__cols[col].get_biff_record()
File "C:\Python27\lib\site-packages\xlwt\Column.py", line 36, in
get_biff_record
return ColInfoRecord(self._index, self._index, self.width,
self._xf_index, options, self.unused).get()
TypeError: __init__() takes exactly 6 arguments (7 given)
Thank you in advance!
Bea