title: How to keep inner outline groups hidden when maximizing outer group
body: <p>I have written a python script which groups rows of an Excel file via the <a href="https://xlsxwriter.readthedocs.io/working_with_outlines.html#outlines" rel="nofollow noreferrer">XlsxWriter Outlines and Grouping</a> feature.</p>
  
  <p>My file has two groups, one nested in the other one. Here's a minimal example:</p>
  
  <pre><code>import xlsxwriter
  
  workbook = xlsxwriter.Workbook('outline.xlsx')
  worksheet = workbook.add_worksheet()
  
  worksheet.set_row(1, None, None, {'level': 1, 'hidden': True})
  worksheet.set_row(2, None, None, {'level': 2, 'hidden': True})
  worksheet.set_row(3, None, None, {'level': 2, 'hidden': True})
  worksheet.set_row(4, None, None, {'level': 1, 'hidden': True})
  
  workbook.close()
  </code></pre>
  
  <p>This generates both groups in the 'hidden' state. When I maximize the first group, the second (inner) group also gets maximized.</p>
  
  <p>How can I prevent the inner group from maximizing when the outer group gets maximized?</p>
  
  <p>The only way to do this, that I know, is to maximize the groups and then minimize the inner and then the outer group by hand. When saved, closed and reopened the groups do not maximize both when maximizing the outer one. So Excel obviously has a way to store this information somehow.</p>