How to format columns with headers using OpenPyXL
问题 I am trying to format certain columns in a date format. I am able to successfully change an individual cell's format using: date_style = Style(number_format="M/D/YYYY") ws['E7'].style = date_style but is there an easier way to apply a blanket formatting to a column aside from the header? I noticed some code on the openpyxl website that is supposed to do this, but it didn't seem to work. It is below: col = ws.column_dimensions['E'] col.number_format = "M/D/YYYY" and I assume if it did work