I am unsure as to what the below means from the OpenPyXL documentation:
Styles can also applied to columns and rows but note that this applies only to cells created (in Excel) after the file is closed. If you want to apply styles to entire rows and columns then you must apply the style to each cell yourself. This is a restriction of the file format:'
I'm unsure what this applies only to cells created (in Excel) after the file is closed means.
>>> col = ws.column_dimensions['A']
>>> col.font = Font(bold=True)
>>> row = ws.row_dimensions[1]
>>> row.font = Font(underline="single")
I tried the below code to change row 4's font but it isn't having any impact.
row = ws.row_dimensions[4]
row.font = Font(name='Arial', size=8)
Is there a solution instead of changing every individual cell?
Thanks