NativeExcel for .Net Developer's Reference

IRange.Columns Property

Returns an IRangeColumns interface that represents the columns in the specified range.

[Visual Basic]
PropertyReadOnlyColumnsAsIRangeColumns
[C#]
IRangeColumnsColumns{get;}
[C++]
__propertyIRangeColumns*get_Columns();
[JScript]
functiongetColumns():IRangeColumns

Property Value

IRangeColumns interface.

Example

This example sets the font style in the second column of range A1:F10 to italic.

[C#]
IRange range = book.Worksheets[1].Range["A1:F10"];
range.Columns[2].Font.Italic = true;
[VisualBasic]
Dim range As IRange
range = book.Worksheets(1).Range("A1:F10")
range.Columns(2).Font.Italic = True
[C++]
IRange* range;
range = book->Worksheets->Item[1]->Range->Item[S"A1:F10"];
range->Columns->Item[2]->Font->Italic = true;

See Also

IRange Interface | NativeExcel Namespace | IRangeColumns Interface