NativeExcel 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]
PropertyOutlineLevelAsInteger
[C#]
intOutlineLevel{get;set;}
[C++]
__propertyintget_OutlineLevel();
__propertyvoidset_OutlineLevel(int);
[JScript]
functiongetOutlineLevel():int
functionsetOutlineLevel(int);

Property Value

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

Remarks

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

Example

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

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