NativeExcel2 for .Net Developer's Reference

IRange.OutlineLevel Property

Gets or sets the current outline level of the rows that contains the specified range.

[Visual Basic]

Property Value

Can be an integer value from 1 to 8. Level one is the outermost summary level.


Use Columns.OutlineLevel to get or set the outline level of the columns.


This example sets the outline level for row two on sheet one.

 book.Worksheets[1].Range["A2"].OutlineLevel = 2;  
 book.Worksheets(1).Range("A2").OutlineLevel = 2  
 book->Worksheets->Item[1]->Range->Item[S"A2"]->OutlineLevel = 2;  
This example is the same as the previous.
 book.Worksheets[1].Range.Rows[2].OutlineLevel = 2;  
 book.Worksheets(1).Range.Rows(2).OutlineLevel = 2  
 book->Worksheets->Item[1]->Range->Rows->Item[2]->OutlineLevel = 2;  
This example sets the outline level for rows three through five on sheet one.
 book.Worksheets[1].Range["A3:A5"].OutlineLevel = 2;  
 book.Worksheets(1).Range("A3:A5").OutlineLevel = 2  
 book->Worksheets->Item[1]->Range->Item[S"A3:A5"]->OutlineLevel = 2;  
This example sets the outline level for column three on sheet one.
 book.Worksheets[1].Range["C1"].Columns.OutlineLevel = 2;  
 book.Worksheets(1).Range("C1").Columns.OutlineLevel = 2  
 book->Worksheets->Item[1]->Range->Item[S"C1"]->Columns->OutlineLevel = 2;  

See Also

IRange Interface | NativeExcel Namespace | Group Method | Ungroup Method | ClearOutline Method | IRangeColumns.OutlineLevel Property | IRangeColumn.OutlineLevel Property