Returns an IRange interface that represents all the cells on the worksheet (not just the cells that are currently in use). Read-only.
[Visual Basic] Property ReadOnly Range As IRange [C#] IRange Range { get; } [C++] __property IRange* get_Range(); [JScript] function get Range() : IRange
IRange interface.
You can also use the Cells property which is synonym for the Range property.
This example sets the value of the cell B3 on sheet one.
[C#]
book.Worksheets[1].Range[3,2].Value = 100;
[Visual Basic]
book.Worksheets(1).Range(3,2).Value = 100
[C++]
book->Worksheets->Item[1]->Range->Item[3,2]->Value = 100;
This example sets the value of the cell F3 on sheet one. [C#]
book.Worksheets[1].Range["F3"].Value = 100;
[Visual Basic]
book.Worksheets(1).Range("F3").Value = 100
[C++]
book->Worksheets->Item[1]->Range->Item[S"F3"]->Value = 100;
This example merges the cells B2:F4 on sheet one. [C#]
book.Worksheets[1].Range["B2:F4"].Merge();
[Visual Basic]
book.Worksheets(1).Range("B2:F4").Merge()
[C++]
book->Worksheets->Item[1]->Range->Item[S"B2:F4"]->Merge();
IWorksheet Interface | NativeExcel Namespace | IRange Interface | Cells Property