I have a summary row followed by 6 rows of details. I've grouped the detail rows and assigned them to OutlineLevel = 2
. I'm trying to hide the detail rows by default so that my summary rows are the only thing showing. Here's my code:
mySummaryRow.OutlineLevel = 1
myDetailRows.EntireRow.Group()
myDetailRows.EntireRow.OutlineLevel = 2
worksheet.Outline.ShowLevels(1, 0) 'Shouldn't this hide myDetailRows and only show mySummaryRow?
worksheet.Outline.SummaryRow = SummaryRow.Above
It's correctly grouping the rows and allows me to expand/collapse the detail rows by hand but when I open the spreadsheet, all rows are expanded by default. How do I hide the detail rows by default so the user is only presented with the summaries?