title: Is it possible to merge cells with an openpyxl write-only worksheet?
body: <p>I am creating worksheets with about 100,000 rows and openpyxl's writing operation is quite slow. It would be useful to get a row object and to fill it in, but I can't find an API for that. The <a href="https://openpyxl.readthedocs.io/en/stable/optimized.html" rel="nofollow noreferrer">documentation on optimization</a> mentions write-only mode. My problem with this mode is that it doesn't obviously support merged cells, because merging cells seems to be an operation that is done on a spreadsheet, not on a row that is appended.</p>
  
  <pre><code>from openpyxl import Workbook
  from openpyxl.cell import WriteOnlyCell
  from openpyxl.comments import Comment
  from openpyxl.styles import Font
  wb = Workbook(write_only = True)
  ws = wb.create_sheet()
  cell = WriteOnlyCell(ws, value="hello world")
  cell.font = Font(name='Courier', size=36)
  cell.comment = Comment(text="A comment", author="Author's Name")
  ws.append([cell, 3.14, "foo","bar",None])
  ws.append(["merged cells"])
  ws.merge_cells(start_row=2,end_row=2,start_column=1,end_column=5)
  wb.save('write_only_file.xlsx')
  </code></pre>
  
  <pre><code>% python cm.py
  Traceback (most recent call last):
    File "cm.py", line 12, in &lt;module&gt;
      ws.merge_cells(start_row=2,end_row=2,start_column=1,end_column=5)
  AttributeError: 'WriteOnlyWorksheet' object has no attribute 'merge_cells'
  </code></pre>
  
  <p>Is there any way to support merging cells? Failing that, what's a faster way to write cells than to get each cell with <code>ws.cell()</code> and manually set it?</p>