SimpleRangeValue
Class
A class that represents a range of data.
Constructors
Section titled “Constructors”constructor
Section titled “constructor”+ new SimpleRangeValue(_data?: InternalScalarValue[][], range?: AbsoluteCellRange, dependencyGraph?: DependencyGraph, _hasOnlyNumbers?: undefined | false | true): SimpleRangeValue
Defined in hyperformula/src/SimpleRangeValue.ts:29
In most cases, it’s more convenient to create a SimpleRangeValue object
by calling one of the static factory methods.
Parameters:
| Name | Type |
|---|---|
_data? |
InternalScalarValue[][] |
range? |
AbsoluteCellRange |
dependencyGraph? |
DependencyGraph |
_hasOnlyNumbers? |
undefined | false | true |
Returns: SimpleRangeValue
Properties
Section titled “Properties”Readonly
• size: ArraySize
Defined in hyperformula/src/SimpleRangeValue.ts:21
A property that represents the size of the range.
Accessors
Section titled “Accessors”• get data(): InternalScalarValue[][]
Defined in hyperformula/src/SimpleRangeValue.ts:78
Returns the range data as a 2D array.
Returns: InternalScalarValue[][]
• get range(): AbsoluteCellRange | undefined
Defined in hyperformula/src/SimpleRangeValue.ts:50
A property that represents the address of the range.
Returns: AbsoluteCellRange | undefined
Methods
Section titled “Methods”effectiveAddressesFromData
Section titled “effectiveAddressesFromData”▸ effectiveAddressesFromData(leftCorner: SimpleCellAddress): IterableIterator‹SimpleCellAddress›
Defined in hyperformula/src/SimpleRangeValue.ts:171
Generates the addresses of the cells contained in the range assuming the provided address is the left corner of the range.
Parameters:
| Name | Type |
|---|---|
leftCorner |
SimpleCellAddress |
Returns: IterableIterator‹SimpleCellAddress›
entriesFromTopLeftCorner
Section titled “entriesFromTopLeftCorner”▸ entriesFromTopLeftCorner(leftCorner: SimpleCellAddress): IterableIterator‹[InternalScalarValue, SimpleCellAddress]›
Defined in hyperformula/src/SimpleRangeValue.ts:185
Generates values and addresses of the cells contained in the range assuming the provided address is the left corner of the range.
This method combines the functionalities of iterateValuesFromTopLeftCorner() and effectiveAddressesFromData().
Parameters:
| Name | Type |
|---|---|
leftCorner |
SimpleCellAddress |
Returns: IterableIterator‹[InternalScalarValue, SimpleCellAddress]›
hasOnlyNumbers
Section titled “hasOnlyNumbers”▸ hasOnlyNumbers(): boolean
Defined in hyperformula/src/SimpleRangeValue.ts:211
Returns true if and only if the range contains only numeric values.
Returns: boolean
height
Section titled “height”▸ height(): number
Defined in hyperformula/src/SimpleRangeValue.ts:148
Returns the number of rows contained in the range.
Returns: number
isAdHoc
Section titled “isAdHoc”▸ isAdHoc(): boolean
Defined in hyperformula/src/SimpleRangeValue.ts:134
Returns true if and only if the SimpleRangeValue has no address set.
Returns: boolean
iterateValuesFromTopLeftCorner
Section titled “iterateValuesFromTopLeftCorner”▸ iterateValuesFromTopLeftCorner(): IterableIterator‹InternalScalarValue›
Defined in hyperformula/src/SimpleRangeValue.ts:197
Generates the values of the cells contained in the range assuming the provided address is the left corner of the range.
Returns: IterableIterator‹InternalScalarValue›
numberOfElements
Section titled “numberOfElements”▸ numberOfElements(): number
Defined in hyperformula/src/SimpleRangeValue.ts:204
Returns the number of cells contained in the range.
Returns: number
rawData
Section titled “rawData”▸ rawData(): InternalScalarValue[][]
Defined in hyperformula/src/SimpleRangeValue.ts:242
Returns the range data as a 2D array.
Internal use only.
Returns: InternalScalarValue[][]
rawNumbers
Section titled “rawNumbers”▸ rawNumbers(): number[][]
Defined in hyperformula/src/SimpleRangeValue.ts:232
Returns the range data as a 2D array of numbers.
Internal use only.
Returns: number[][]
sameDimensionsAs
Section titled “sameDimensionsAs”▸ sameDimensionsAs(other: SimpleRangeValue): boolean
Defined in hyperformula/src/SimpleRangeValue.ts:250
Returns true if and only if the range has the same width and height as the other range object.
Parameters:
| Name | Type |
|---|---|
other |
SimpleRangeValue |
Returns: boolean
valuesFromTopLeftCorner
Section titled “valuesFromTopLeftCorner”▸ valuesFromTopLeftCorner(): InternalScalarValue[]
Defined in hyperformula/src/SimpleRangeValue.ts:155
Returns the range data as a 1D array.
Returns: InternalScalarValue[]
▸ width(): number
Defined in hyperformula/src/SimpleRangeValue.ts:141
Returns the number of columns contained in the range.
Returns: number
fromRange
Section titled “fromRange”Static
▸ fromRange(data: InternalScalarValue[][], range: AbsoluteCellRange, dependencyGraph: DependencyGraph): SimpleRangeValue
Defined in hyperformula/src/SimpleRangeValue.ts:86
A factory method. Returns a SimpleRangeValue object with the provided range address and the provided data.
Parameters:
| Name | Type |
|---|---|
data |
InternalScalarValue[][] |
range |
AbsoluteCellRange |
dependencyGraph |
DependencyGraph |
Returns: SimpleRangeValue
fromScalar
Section titled “fromScalar”Static
▸ fromScalar(scalar: InternalScalarValue): SimpleRangeValue
Defined in hyperformula/src/SimpleRangeValue.ts:127
A factory method. Returns a SimpleRangeValue object that contains a single value.
Parameters:
| Name | Type |
|---|---|
scalar |
InternalScalarValue |
Returns: SimpleRangeValue
onlyNumbers
Section titled “onlyNumbers”Static
▸ onlyNumbers(data: number[][]): SimpleRangeValue
Defined in hyperformula/src/SimpleRangeValue.ts:93
A factory method. Returns a SimpleRangeValue object with the provided numeric data.
Parameters:
| Name | Type |
|---|---|
data |
number[][] |
Returns: SimpleRangeValue
onlyRange
Section titled “onlyRange”Static
▸ onlyRange(range: AbsoluteCellRange, dependencyGraph: DependencyGraph): SimpleRangeValue
Defined in hyperformula/src/SimpleRangeValue.ts:107
A factory method. Returns a SimpleRangeValue object with the provided range address.
Parameters:
| Name | Type |
|---|---|
range |
AbsoluteCellRange |
dependencyGraph |
DependencyGraph |
Returns: SimpleRangeValue
onlyValues
Section titled “onlyValues”Static
▸ onlyValues(data: InternalScalarValue[][]): SimpleRangeValue
Defined in hyperformula/src/SimpleRangeValue.ts:100
A factory method. Returns a SimpleRangeValue object with the provided data.
Parameters:
| Name | Type |
|---|---|
data |
InternalScalarValue[][] |
Returns: SimpleRangeValue