NativeExcel2 for .Net Developer's Reference

IRangeColumns.GroupMethod

Increases the outline level of columns in the specified range.

[Visual Basic]
SubGroup()
[C#]
voidGroup();
[C++]
voidGroup();
[JScript]
functionGroup();

Example

This example groups columns in the range B1:F1.

[C#]
 book.Worksheets[1].Range["B1:F1"].Columns.Group();
[VisualBasic]
 book.Worksheets(1).Range("B1:F1").Columns.Group()
[C++]
 book->Worksheets->Item[1]->Range->Item[S"B1:F1"]->Columns->Group();

See Also

IRangeColumns Interface | NativeExcel Namespace | Ungroup Method | OutlineLevel Property | ClearOutline Method