NativeExcel for .Net Developer's Reference

IRange.ItemProperty

Returns an IRange interface that represents a range at an offset to the specified range.

Overload List

Returns an IRange interface that represents a single cell by using row and column index numbers.

[Visual Basic] DefaultPropertyReadOnlyItem(ByValInteger,ByValInteger)AsIRange
[C#] IRangethis[int,int]{get;}
[C++] __propertyIRange*get_Item(int,int);

Returns an IRange interface that represents a cell or range of cells by using row and column index numbers.

[Visual Basic] DefaultPropertyReadOnlyItem(ByValInteger,ByValInteger,ByValInteger,ByValInteger)AsIRange
[C#] IRangethis[int,int,int,int]{get;}
[C++] __propertyIRange*get_Item(int,int,int,int);

Returns an IRange interface that represents a cell or range of cells by using A1 reference style.

[Visual Basic] DefaultPropertyReadOnlyItem(ByValString)AsIRange
[C#] IRangethis[string]{get;}
[C++] __propertyIRange*get_Item(String*);

Returns an IRange interface that represents a cell or range of cells by using A1 reference style.

[Visual Basic] DefaultPropertyReadOnlyItem(ByValString,ByValString)AsIRange
[C#] IRangethis[string,string]{get;}
[C++] __propertyIRange*get_Item(String*,String*);

Example

This example sets the value of cell A1 on the first sheet to 3.14159.

[C#]
book.Worksheets[1].Range["A1"].Value = 3.14159;
[VisualBasic]
book.Worksheets(1).Range("A1").Value = 3.14159
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1"]->Value = 3.14159;
This example is the same as the previous.
[C#]
book.Worksheets[1].Range[1,1].Value = 3.14159;
[VisualBasic]
book.Worksheets(1).Range(1,1).Value = 3.14159
[C++]
book->Worksheets->Item[1]->Range->Item[1,1]->Value = 3.14159;
This example sets the font style in cells A1:D10 on the first sheet to bold.
[C#]
book.Worksheets[1].Range["A1:D10"].Font.Bold = true;
[VisualBasic]
book.Worksheets(1).Range("A1:D10").Font.Bold = True
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1:D10"]->Font->Bold = true;
This example is the same as the previous.
[C#]
book.Worksheets[1].Range[1, 1, 10, 4].Font.Bold = true;
[VisualBasic]
book.Worksheets(1).Range(1, 1, 10, 4).Font.Bold = True
[C++]
book->Worksheets->Item[1]->Range->Item[1, 1, 10, 4]->Font->Bold = true;

See Also

IRange Interface | NativeExcel Namespace | How to reference Cells and Ranges | How to reference Cells and Ranges