Represents a range of cells in a spreadsheet.
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public struct RangeRefInitializes a new instance of the RangeRef struct with the specified start and end cell references.
public RangeRef(Documents.Spreadsheet.CellRef start, Documents.Spreadsheet.CellRef end)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | start | |
| Documents.Spreadsheet.CellRef | end |
Checks if this range is collapsed, meaning the start and end cell references are the same.
public bool Collapsed { get; }
| Type | Description |
|---|---|
| bool | Checks if this range is collapsed, meaning the start and end cell references are the same. |
Gets the number of columns in the range.
public int Columns { get; }
| Type | Description |
|---|---|
| int | Gets the number of columns in the range. |
Gets the ending cell reference of the range.
public Documents.Spreadsheet.CellRef End { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellRef | Gets the ending cell reference of the range. |
Represents an invalid range reference, which is used to indicate that a range is not defined or does not exist.
public Documents.Spreadsheet.RangeRef Invalid { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef | Represents an invalid range reference, which is used to indicate that a range is not defined or does not exist. |
Gets the number of rows and columns in the range.
public int Rows { get; }
| Type | Description |
|---|---|
| int | Gets the number of rows and columns in the range. |
Gets the starting cell reference of the range.
public Documents.Spreadsheet.CellRef Start { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellRef | Gets the starting cell reference of the range. |
Checks if this range contains a specific row address.
public bool Contains(Documents.Spreadsheet.RowRef address)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RowRef | address |
| Type | Description |
|---|---|
| bool |
Checks if this range contains a specific row address.
public bool Contains(Documents.Spreadsheet.ColumnRef address)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.ColumnRef | address |
| Type | Description |
|---|---|
| bool |
Checks if this range contains a specific row address.
public bool Contains(int row, int column)
| Type | Name | Description |
|---|---|---|
| int | row | |
| int | column |
| Type | Description |
|---|---|
| bool |
Checks if this range contains a specific row address.
public bool Contains(Documents.Spreadsheet.CellRef address)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | address |
| Type | Description |
|---|---|
| bool |
Checks if this RangeRef instance is equal to another RangeRef instance.
public bool Equals(Documents.Spreadsheet.RangeRef other)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | other |
| Type | Description |
|---|---|
| bool |
Checks if this RangeRef instance is equal to another RangeRef instance.
public override bool Equals(object obj)
| Type | Name | Description |
|---|---|---|
| object | obj |
| Type | Description |
|---|---|
| bool |
Creates a new RangeRef instance from two cell references, representing the start and end of the range.
public static Documents.Spreadsheet.RangeRef FromCell(Documents.Spreadsheet.CellRef cell)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | cell |
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef |
Creates a new RangeRef instance from two cell references, representing the start and end of the range.
public static Documents.Spreadsheet.RangeRef FromCells(Documents.Spreadsheet.CellRef start, Documents.Spreadsheet.CellRef end)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | start | |
| Documents.Spreadsheet.CellRef | end |
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef |
Returns a collection of cell references that represent all the cells in the range.
public IEnumerable<Documents.Spreadsheet.CellRef> GetCells()
| Type | Description |
|---|---|
| IEnumerable<Documents.Spreadsheet.CellRef> |
Calculates the intersection of this range with another range.
public Documents.Spreadsheet.RangeRef Intersection(Documents.Spreadsheet.RangeRef other)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | other |
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef |
Checks if this range overlaps with another range.
public bool Overlaps(Documents.Spreadsheet.RangeRef other)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | other |
| Type | Description |
|---|---|
| bool |
Parses a string representation of a range into a RangeRef instance.
public static Documents.Spreadsheet.RangeRef Parse(string range)
| Type | Name | Description |
|---|---|---|
| string | range |
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef |
Returns a string representation of the range in A1 notation (e.g., "A1:B2").
public override string ToString()
| Type | Description |
|---|---|
| string |
public static bool operator !=(Documents.Spreadsheet.RangeRef left, Documents.Spreadsheet.RangeRef right)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | left | |
| Documents.Spreadsheet.RangeRef | right |
| Type | Description |
|---|---|
| bool |
public static bool operator ==(Documents.Spreadsheet.RangeRef left, Documents.Spreadsheet.RangeRef right)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | left | |
| Documents.Spreadsheet.RangeRef | right |
| Type | Description |
|---|---|
| bool |