Row outline level doesn't work

Issue #84 resolved
antoniolml created an issue

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/, write_worksheet_data(), line 151, added 2 lines: {{{


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.

Comments (12)

  1. Régis Décamps

    Similarly, there is no support for *reading* outline level in version 1.5.6 I will provide a patch soon.

  2. Log in to comment