How to freeze entire header row in openpyxl?
Make sure cell
isn't on row one - freeze_panes
will freeze rows above the given cell and columns to the left.
Example:
from openpyxl import Workbookwb = Workbook()ws = wb.activec = ws['B2']ws.freeze_panes = cwb.save('test.xlsx')
This will give you a blank worksheet with both row 1 and column A frozen.