NativeExcel2 for .Net Developer's Reference


Returns a single column or subsequence of columns from the specified range.

Overload List

Returns an IRangeColumn interface that represents a column by using column index number.

[Visual Basic] DefaultPropertyReadOnlyItem(ByValInteger)AsIRangeColumn
[C#] IRangeColumnthis[int]{get;}
[C++] __propertyIRangeColumn*get_Item(int);

Returns IRangeColums interface that represents a subsequence or columns.

[Visual Basic] DefaultPropertyReadOnlyItem(ByValInteger,ByValInteger)AsIRangeColumns
[C#] IRangeColumnsthis[int,int]{get;}
[C++] __propertyIRangeColumns*get_Item(int,int);


This example sets the width of the first column in sheet one.

 book.Worksheets[1].Cells.Columns[1].ColumnWidth = 20; 
 book.Worksheets[1].Cells.Columns(1).ColumnWidth = 20
 book->Worksheets->Item[1]->Cells->Columns;->Item[1]->ColumnWidth = 20;
This example sets the width of columns one through five on sheet one.
 book.Worksheets[1].Cells.Columns[1,5].ColumnWidth = 20; 
 book.Worksheets[1].Cells.Columns(1,5).ColumnWidth = 20
 book->Worksheets->Item[1]->Cells->Columns->Item[1,5]->ColumnWidth = 20;

See Also

IRangeColumns Interface | NativeExcel Namespace | IRangeColumn Interface | IRange.Columns Property