Row outline level doesn't work
Created originally on Bitbucket by antoniolml
I'm doing some documents requiring outline levels in both rows and columns. After some checking through the source code, I found that there was not support for this feature on rows. With no knowledge of the document specification and just by looking in the way outline levels are handled for rows I've added and successfully tested the fix for this. At writer/workshet.py, write_worksheet_data(), line 151, added 2 lines: {{{ #!python ... if row_dimension.height > 0: attrs['ht'] = str(row_dimension.height) attrs['customHeight'] = '1'
if row_dimension.outline_level > 0: attrs['outlineLevel'] = str(row_dimension.outline_level) start_tag(doc, 'row', attrs) row_cells = cells_by_row[row_idx] ... }}}
I've tested it with several outline levels on some pretty big documents. Works with no problems when opening the document on Excel 2010.
Attached modified file from writer dir.
Attachments: worksheet.pyopenpyxl_issue_84_reader.7z