rectangular area of cells can be merged into single cell with the merge_cells(sheet method enter the following into the interactive shellimport openpyxl wb openpyxl workbook(sheet wb active sheet merge_cells(' : 'merge all these cells sheet[' ''twelve cells merged together sheet merge_cells(' : 'merge these two cells sheet[' ''two merged cells wb save('merged xlsx'the argument to merge_cells(is single string of the top-left and bottomright cells of the rectangular area to be merged' : merges cells into single cell to set the value of these merged cellssimply set the value of the top-left cell of the merged group when you run this codemerged xlsx will look like figure - figure - merged cells in spreadsheet to unmerge cellscall the unmerge_cells(sheet method enter this into the interactive shellimport openpyxl wb openpyxl load_workbook('merged xlsx'sheet wb active sheet unmerge_cells(' : 'split these cells up sheet unmerge_cells(' : 'wb save('merged xlsx'if you save your changes and then take look at the spreadsheetyou'll see that the merged cells have gone back to being individual cells freezing panes for spreadsheets too large to be displayed all at onceit' helpful to "freezea few of the top rows or leftmost columns onscreen frozen column or row headersfor exampleare always visible to the user even as