NativeExcel2 for .Net Developer's Reference

IRangeColumns Interface

Represents a collection of columns.

For a list of all members of this type, see IRangeColumns Members.

[Visual Basic]
PublicInterfaceIRangeColumns
ImplementsIRange, IEnumerable
[C#]
publicinterfaceIRangeColumns:IRange, IEnumerable
[C++]
public__gc__interfaceIRangeColumns: publicIRange, IEnumerable
[JScript]
publicinterfaceIRangeColumnsextendsIRange, IEnumerable

Remarks

Use the IRange.Columns, IRange.EntireColumn properties to return the IRangeColumns interface.

Example

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

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

This example copies the values from the second column of range A1:F10 to third.
[C#]
 IRangeColumns cols = book.Worksheets[1].Range["A1:F10"].Columns;
 cols[3].Value = cols[2].Value;
[VisualBasic]
 Dim cols As IRangeColumns
 cols = book.Worksheets(1).Range("A1:F10").Columns
 cols(3).Value = cols(2).Value
[C++]
 IRangeColumns* cols = book->Worksheets->Item[1]->Range->Item[S"A1:F10"]->Columns;
 cols->Item[3]->Value = cols->Item[2]->Value;

Requirements

Namespace: NativeExcel

Assembly: NativeExcel (in NativeExcel.dll)

See Also

IRangeColumns Members | NativeExcel Namespace | IRange.Columns Property | IRange.EntireColumn Property