NativeExcel for .Net Developer's Reference

IRange.Item Property (String)

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

[C#] In C#, this property is the indexer for the IRange class.

[Visual Basic]
returnValue = IRangeObject.Item( range );
returnValue = IRangeObject( range );

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.


String that indicates a cell or a range of cells by using A1 reference style.

Property Value

Returns an IRange interface.


This example sets the value of cell B10 on the first sheet to 100.

book.Worksheets[1].Range["B10"].Value = 100;
book.Worksheets(1).Range("B10").Value = 100
book->Worksheets->Item[1]->Range->Item[S"B10"]->Value = 100;
This example sets the font style in cells A1:D10 on the first sheet to bold.
book.Worksheets[1].Range["A1:D10"].Font.Bold = true;
book.Worksheets(1).Range("A1:D10").Font.Bold = True
book->Worksheets->Item[1]->Range->Item[S"A1:D10"]->Font->Bold = true;

See Also

IRange Interface | NativeExcel Namespace | IRange.Item Overload List | How to reference Cells and Ranges