RangeRef Struct

Represents a range of cells in a spreadsheet.

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public struct RangeRef

Constructors

RangeRefLink to this section

Initializes a new instance of the RangeRef struct with the specified start and end cell references.

Declaration
public RangeRef(Documents.Spreadsheet.CellRef start, Documents.Spreadsheet.CellRef end)
Parameters

Properties

CollapsedLink to this section

Checks if this range is collapsed, meaning the start and end cell references are the same.

Declaration
public bool Collapsed { get; }
Property Value
Type Description
boolChecks if this range is collapsed, meaning the start and end cell references are the same.

ColumnsLink to this section

Gets the number of columns in the range.

Declaration
public int Columns { get; }
Property Value
Type Description
intGets the number of columns in the range.

EndLink to this section

Gets the ending cell reference of the range.

Declaration
public Documents.Spreadsheet.CellRef End { get; }
Property Value
Type Description
Documents.Spreadsheet.CellRefGets the ending cell reference of the range.

InvalidLink to this section

Represents an invalid range reference, which is used to indicate that a range is not defined or does not exist.

Declaration
public Documents.Spreadsheet.RangeRef Invalid { get; }
Property Value
Type Description
Documents.Spreadsheet.RangeRefRepresents an invalid range reference, which is used to indicate that a range is not defined or does not exist.

RowsLink to this section

Gets the number of rows and columns in the range.

Declaration
public int Rows { get; }
Property Value
Type Description
intGets the number of rows and columns in the range.

StartLink to this section

Gets the starting cell reference of the range.

Declaration
public Documents.Spreadsheet.CellRef Start { get; }
Property Value
Type Description
Documents.Spreadsheet.CellRefGets the starting cell reference of the range.

Methods

ContainsLink to this section

Checks if this range contains a specific row address.

Declaration
public bool Contains(Documents.Spreadsheet.RowRef address)
Parameters
Type Name Description
Documents.Spreadsheet.RowRef address
Returns
Type Description
bool

ContainsLink to this section

Checks if this range contains a specific row address.

Declaration
public bool Contains(Documents.Spreadsheet.ColumnRef address)
Parameters
Type Name Description
Documents.Spreadsheet.ColumnRef address
Returns
Type Description
bool

ContainsLink to this section

Checks if this range contains a specific row address.

Declaration
public bool Contains(int row, int column)
Parameters
Type Name Description
int row
int column
Returns
Type Description
bool

ContainsLink to this section

Checks if this range contains a specific row address.

Declaration
public bool Contains(Documents.Spreadsheet.CellRef address)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef address
Returns
Type Description
bool

EqualsLink to this section

Checks if this RangeRef instance is equal to another RangeRef instance.

Declaration
public bool Equals(Documents.Spreadsheet.RangeRef other)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef other
Returns
Type Description
bool

EqualsLink to this section

Checks if this RangeRef instance is equal to another RangeRef instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool

FromCellLink to this section

Creates a new RangeRef instance from two cell references, representing the start and end of the range.

Declaration
public static Documents.Spreadsheet.RangeRef FromCell(Documents.Spreadsheet.CellRef cell)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef cell
Returns

FromCellsLink to this section

Creates a new RangeRef instance from two cell references, representing the start and end of the range.

Declaration
public static Documents.Spreadsheet.RangeRef FromCells(Documents.Spreadsheet.CellRef start, Documents.Spreadsheet.CellRef end)
Parameters
Returns

GetCellsLink to this section

Returns a collection of cell references that represent all the cells in the range.

Declaration
public IEnumerable<Documents.Spreadsheet.CellRef> GetCells()
Returns
Type Description
IEnumerable<Documents.Spreadsheet.CellRef>

GetHashCodeLink to this section

Declaration
public override int GetHashCode()
Returns
Type Description
int

IntersectionLink to this section

Calculates the intersection of this range with another range.

Declaration
public Documents.Spreadsheet.RangeRef Intersection(Documents.Spreadsheet.RangeRef other)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef other
Returns

OverlapsLink to this section

Checks if this range overlaps with another range.

Declaration
public bool Overlaps(Documents.Spreadsheet.RangeRef other)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef other
Returns
Type Description
bool

ParseLink to this section

Parses a string representation of a range into a RangeRef instance.

Declaration
public static Documents.Spreadsheet.RangeRef Parse(string range)
Parameters
Type Name Description
string range
Returns

ToStringLink to this section

Returns a string representation of the range in A1 notation (e.g., "A1:B2").

Declaration
public override string ToString()
Returns
Type Description
string

Operators

operator !=Link to this section

Declaration
public static bool operator !=(Documents.Spreadsheet.RangeRef left, Documents.Spreadsheet.RangeRef right)
Parameters
Returns
Type Description
bool

operator ==Link to this section

Declaration
public static bool operator ==(Documents.Spreadsheet.RangeRef left, Documents.Spreadsheet.RangeRef right)
Parameters
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙