title: Python OpenPyxl trouble detecting all merged cells
body: <p>I am trying to detect all the merged cells in a <em>openpyxl.worksheet.worksheet.Worksheet</em> object and it seems that the <em>merged_cells.ranges</em> cannot all the merged cells but merged cells in some columns. My goal is to detect the merged cells, unmerge them and then remerge certain cells based on column values. During unmerging, I fill the unmerged cells with the top-left cell value of the merged cell.</p>
  <p>I have worked around with this problem by filling nan in cells which are supposed to be recognized as a merged cell with previous value in the column since all my merged cells range in the same column, for example A18:A19, B18:B19. But things have become more tricky after I updated my xlsx file. OpenPyxl didn't find merged cells in A, C and E columns in my previous xlsx. Now it has trouble finding merged cells in B, D and F columns. Two xlsx file has the same format but different data.</p>
  <p>Here is an example of what my xlsx looks like:
  <a href="https://i.stack.imgur.com/eBBcZ.png" rel="nofollow noreferrer">xlsx sample</a></p>
  <p>My code to read the xlsx then detect &amp; unmerge the merged cells:</p>
  <pre><code>client_info_wb = load_workbook(path_client_info)
  sheet_name = client_info_wb.sheetnames[0]
  client_info_ws = client_info_wb[sheet_name]
  
  for cell_group in client_info_ws.merged_cells.ranges:
      print(cell_group)
      min_col, min_row, max_col, max_row = range_boundaries(str(cell_group))
      top_left_cell_value = client_info_ws.cell(row=min_row, column=min_col).value
      print(top_left_cell_value)
      client_info_ws.unmerge_cells(str(cell_group))
      for row in client_info_ws.iter_rows(min_col=min_col, min_row=min_row, max_col=max_col, max_row=max_row):
          for cell in row:
              cell.value = top_left_cell_value
  </code></pre>
  <p>Output for <code>print(cell_group)</code>:</p>
  <pre><code>A48:A49
  2021-01-05
  C48:C49
  XX5614
  E48:E49
  ID
  A46:A47
  2021-01-05
  C46:C47
  XX2134
  E46:E47
  ID
  A44:A45
  2021-01-05
  C44:C45
  XX1234
  E44:E45
  ID
  </code></pre>
  <p>The information in those columns where openpyxl merged_cells.ranges fails to detect merged cells is necessary to the following operations in my code. So can anyone help me with this? Are there anyone having the same issue? I have spent a long time trying to find the patterns in my xlsx to find out what is causing the trouble and had no luck.</p>