Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

Spreadsheetgear - collapse detail rows and show only summary

$
0
0

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?


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>