{"id":36,"date":"2026-02-04T17:13:13","date_gmt":"2026-02-04T09:13:13","guid":{"rendered":"https:\/\/openpyxl.com\/blog\/?p=36"},"modified":"2026-01-16T07:09:20","modified_gmt":"2026-01-16T07:09:20","slug":"how-to-unmerge-cell-ranges-using-openpyxl","status":"publish","type":"post","link":"https:\/\/openpyxl.com\/blog\/how-to-unmerge-cell-ranges-using-openpyxl.html","title":{"rendered":"How To Unmerge Cell Ranges Using OpenPyXL?"},"content":{"rendered":"<h2>Method<\/h2>\n<p style=\"margin: 0in; font-family: \u5fae\u8f6f\u96c5\u9ed1; font-size: 14.0pt;\">Use the `unmerge_cells` method to unmerge cells.<\/p>\n<p lang=\"en-US\" style=\"margin: 0in; font-family: \u5fae\u8f6f\u96c5\u9ed1; font-size: 14.0pt;\"><span style=\"background: white;\">ws.unmerge_cells(range_string=None,start_row=None,start_column=None,end_row=None,end_column=None)<\/span><\/p>\n<h2>Sample Code<\/h2>\n\n\n<pre class=\"wp-block-code\"><code># Unmerge Cell Ranges\n\n#Import load_workbook function\nfrom openpyxl import Workbook\n\n#Create a new workbook\nwb=Workbook()\n#Get the active worksheet\nws=wb.active\n\n#Unmerge a cell range\nws.unmerge_cells('C3:E4')\n#ws.unmerge_cells(start_row=3, start_column=3, \\\n#    end_row=4, end_column=5)\n\nwb.save('test.xlsx')\nwb.close()\n<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenPyXL<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-openpyxl-cell-range"],"_links":{"self":[{"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":1,"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":279,"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/posts\/36\/revisions\/279"}],"wp:attachment":[{"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/openpyxl.com\/blog\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}