The calculation of width for ws.column_dimensions doesn't work
The code
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws['A1'] = 'a' * 20
ws['B1'] = 'a' * 30
ws['C1'] = 'a' * 40
print('A1 width', ws.column_dimensions['A'].width)
print('B1 width', ws.column_dimensions['B'].width)
print('C1 width', ws.column_dimensions['C'].width)
ws['A2'] = 'a' * 50
ws['B2'] = 'a' * 60
ws['C2'] = 'a' * 70
print('A2 width', ws.column_dimensions['A'].width)
print('B2 width', ws.column_dimensions['B'].width)
print('C2 width', ws.column_dimensions['C'].width)
returns
A1 width 13.0
B1 width 13.0
C1 width 13.0
A2 width 13.0
B2 width 13.0
C2 width 13.0
As I inderstand the adding of any value to a cell doesn't change column width now.
I am using the last verion (I have installed it just today from PyPi)
Could you please take a look
Edited by M-Startc