openpyxleach worksheet object has freeze_panes attribute that can be set to cell object or string of cell' coordinates note that all rows above and all columns to the left of this cell will be frozenbut the row and column of the cell itself will not be frozen to unfreeze all panesset freeze_panes to none or ' table - shows which rows and columns will be frozen for some example settings of freeze_panes table - frozen pane examples freeze_panes setting rows and columns frozen sheet freeze_panes ' row sheet freeze_panes ' column sheet freeze_panes ' columns and sheet freeze_panes ' row and columns and sheet freeze_panes ' or sheet freeze_panes none no frozen panes make sure you have the produce sales spreadsheet from com/automatestuff then enter the following into the interactive shellimport openpyxl wb openpyxl load_workbook('producesales xlsx'sheet wb active sheet freeze_panes ' freeze the rows above wb save('freezeexample xlsx'if you set the freeze_panes attribute to ' 'row will always be viewableno matter where the user scrolls in the spreadsheet you can see this in figure - figure - with freeze_panes set to ' 'row is always visibleeven as the user scrolls down working with excel spreadsheets