[]
Gets the IRange object that is specified by its A1-style reference.
IRange this[string reference] { get; }
ReadOnly Default Property Item(reference As String) As IRange
| Type | Name | Description |
|---|---|---|
| string | reference | The A1-style reference of the range. |
| Type | Description |
|---|---|
| IRange | The specified range. |
IRangeProvider ranges = worksheet.Range;
IRange range = ranges["A1:B2"];
range.Value = "Ready";
object value = worksheet.Range["A1"].Value;
Gets the IRange object that represents the cell at the specified row and column.
IRange this[int row, int column] { get; }
ReadOnly Default Property Item(row As Integer, column As Integer) As IRange
| Type | Name | Description |
|---|---|---|
| int | row | The zero-based row index of the cell. |
| int | column | The zero-based column index of the cell. |
| Type | Description |
|---|---|
| IRange | The specified cell. |
IRangeProvider ranges = worksheet.Range;
IRange cell = ranges[1, 1];
cell.Value = "B2";
object value = worksheet.Range["B2"].Value;
Gets the IRange object that represents the range at the specified row and column with the specified size.
IRange this[int row, int column, int rowCount, int columnCount] { get; }
ReadOnly Default Property Item(row As Integer, column As Integer, rowCount As Integer, columnCount As Integer) As IRange
| Type | Name | Description |
|---|---|---|
| int | row | The zero-based row index of the first row in the range. |
| int | column | The zero-based column index of the first column in the range. |
| int | rowCount | The number of rows in the range. |
| int | columnCount | The number of columns in the range. |
| Type | Description |
|---|---|
| IRange | The specified range. |
IRangeProvider ranges = worksheet.Range;
IRange range = ranges[0, 0, 2, 2];
range.Value = new object[,] { { "Name", "Score" }, { "Alice", 95 } };
object value = worksheet.Range["B2"].Value;