title: How to split merged Excel cells with Python?
body: <p>I am trying to split only the merged cells in Excel file (with multiple sheets) that are like:</p>
  
  <p><a href="https://i.stack.imgur.com/GSIlV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GSIlV.png" alt="Original sheets"></a></p>
  
  <p><strong>Please</strong> note that there are partially/fully empty rows. These rows are not merged.  </p>
  
  <p>Using <code>openpyxl</code>, I found the merged cell ranges in each sheet with this code:</p>
  
  <pre><code>wb2 = load_workbook('Example.xlsx')  
  sheets = wb2.sheetnames  ##['Sheet1', 'Sheet2']
  for i,sheet in enumerate(sheets):
      ws = wb2[sheets[i]]
      print(ws.merged_cell_ranges)   
  </code></pre>
  
  <p>The print output:<br>
  <code>['B3:B9', 'B13:B14', 'A3:A9', 'A13:A14', 'B20:B22', 'A20:A22']</code> </p>
  
  <p><code>['B5:B9', 'A12:A14', 'B12:B14', 'A17:A18', 'B17:B18', 'A27:A28', 'B27:B28', 'A20:A22', 'B20:B22', 'A3:A4', 'B3:B4', 'A5:A9']</code>  </p>
  
  <p>Since I found the merged cell ranges, I need to split the ranges and fill in the corresponding rows like this:  </p>
  
  <p><a href="https://i.stack.imgur.com/zbcl6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zbcl6.png" alt="Desired Sheets"></a></p>
  
  <p>How can I split like this using <code>openpyxl</code>? I am new to using this module. Any feedback is greatly appreciated!</p>