Struct representing a cell range with a start and end address.
More...
|
| | Range (Address start, Address end) |
| | Constructor with addresses as arguments. The addresses are automatically swapped if the start address is greater than the end address. Referencing modifiers ($) for rows and columns can be passed through the address type of the address objects.
|
| | Range (int startColumn, int startRow, int endColumn, int endRow) |
| | Constructor with start and end rows and columns as arguments. The addresses are automatically swapped if the start address is greater than the end address. Referencing modifiers ($) for rows and columns are not considered.
|
| | Range (string range) |
| | Constructor with a range string as argument. The addresses are automatically swapped if the start address is greater than the end address. Referencing modifiers ($) for rows and columns can be defined in the passed string.
|
| bool | Contains (Range other) |
| | Gets whether another range is completely enclosed by this range.
|
| bool | Contains (Address address) |
| | Determines whether an address is within this range.
|
| bool | Overlaps (Range other) |
| | Determines whether the passed range overlaps with this range.
|
| IReadOnlyList< Address > | ResolveEnclosedAddresses () |
| | Gets a list of all addresses between the start and end address.
|
| override string | ToString () |
| | Overwritten ToString method.
|
| override bool | Equals (object obj) |
| | Compares two objects whether they are ranges and equal. The cell types (possible $ prefix) are considered.
|
| override int | GetHashCode () |
| | Gets the hash code of the range object according to its string representation.
|
|
| static bool | operator== (Range range1, Range range2) |
| | Compares two objects whether they are ranges and equal. The cell types (possible $ prefix) are considered. This method reflects Equals(object).
|
| static bool | operator!= (Range range1, Range range2) |
| | Compares two objects whether they not equal. This method reflects the inverted method of Equals(object).
|
Struct representing a cell range with a start and end address.
Definition at line 15 of file Range.cs.
◆ Range() [1/3]
Constructor with addresses as arguments. The addresses are automatically swapped if the start address is greater than the end address. Referencing modifiers ($) for rows and columns can be passed through the address type of the address objects.
- Parameters
-
| start | Start address of the range |
| end | End address of the range |
Definition at line 35 of file Range.cs.
◆ Range() [2/3]
| NanoXLSX.Range.Range |
( |
int | startColumn, |
|
|
int | startRow, |
|
|
int | endColumn, |
|
|
int | endRow ) |
Constructor with start and end rows and columns as arguments. The addresses are automatically swapped if the start address is greater than the end address. Referencing modifiers ($) for rows and columns are not considered.
- Parameters
-
| startColumn | Start column number (zero based) of the range |
| startRow | Start row number (zero based) of the range |
| endColumn | End column number (zero based) of the range |
| endRow | End row number (zero based) of the range |
Definition at line 57 of file Range.cs.
◆ Range() [3/3]
| NanoXLSX.Range.Range |
( |
string | range | ) |
|
Constructor with a range string as argument. The addresses are automatically swapped if the start address is greater than the end address. Referencing modifiers ($) for rows and columns can be defined in the passed string.
- Parameters
-
Definition at line 67 of file Range.cs.
◆ Contains() [1/2]
| bool NanoXLSX.Range.Contains |
( |
Address | address | ) |
|
Determines whether an address is within this range.
- Parameters
-
- Returns
- True if the address is part of this range, otherwise false
Definition at line 100 of file Range.cs.
◆ Contains() [2/2]
| bool NanoXLSX.Range.Contains |
( |
Range | other | ) |
|
Gets whether another range is completely enclosed by this range.
- Parameters
-
| other | Other range to check |
- Returns
- True if the other range is completely enclosed. False if only partial overlapping or not intersecting
Definition at line 87 of file Range.cs.
◆ Equals()
| override bool NanoXLSX.Range.Equals |
( |
object | obj | ) |
|
Compares two objects whether they are ranges and equal. The cell types (possible $ prefix) are considered.
- Parameters
-
| obj | Other object to compare |
- Returns
- True if the two objects are the same range
Definition at line 146 of file Range.cs.
◆ GetHashCode()
| override int NanoXLSX.Range.GetHashCode |
( |
| ) |
|
Gets the hash code of the range object according to its string representation.
- Returns
- Hash code of the range
Definition at line 160 of file Range.cs.
◆ operator!=()
| bool NanoXLSX.Range.operator!= |
( |
Range | range1, |
|
|
Range | range2 ) |
|
static |
Compares two objects whether they not equal. This method reflects the inverted method of Equals(object).
- Parameters
-
| range1 | First range object |
| range2 | Second range object |
- Returns
- False, if both objects are equal, otherwise true
Definition at line 185 of file Range.cs.
◆ operator==()
| bool NanoXLSX.Range.operator== |
( |
Range | range1, |
|
|
Range | range2 ) |
|
static |
Compares two objects whether they are ranges and equal. The cell types (possible $ prefix) are considered. This method reflects Equals(object).
- Parameters
-
| range1 | First range object |
| range2 | Second range object |
- Returns
- True, if both objects are equal, otherwise false
Definition at line 174 of file Range.cs.
◆ Overlaps()
| bool NanoXLSX.Range.Overlaps |
( |
Range | other | ) |
|
Determines whether the passed range overlaps with this range.
- Parameters
-
| other | Range to check for overlapping |
- Returns
- True if overlapping, otherwise false
Definition at line 113 of file Range.cs.
◆ ResolveEnclosedAddresses()
| IReadOnlyList< Address > NanoXLSX.Range.ResolveEnclosedAddresses |
( |
| ) |
|
Gets a list of all addresses between the start and end address.
- Returns
- List of Addresses
Definition at line 125 of file Range.cs.
◆ ToString()
| override string NanoXLSX.Range.ToString |
( |
| ) |
|
Overwritten ToString method.
- Returns
- Returns the range (e.g. 'A1:B12')
Definition at line 136 of file Range.cs.
◆ EndAddress
End address of the range.
Definition at line 23 of file Range.cs.
◆ StartAddress
| Address NanoXLSX.Range.StartAddress |
|
get |
Start address of the range.
Definition at line 27 of file Range.cs.
The documentation for this struct was generated from the following file: