ReferredArea
ReferredArea class
Represents a referred area by the formula.
class ReferredArea;
Methods
Method | Description |
---|---|
isExternalLink() | Indicates whether this is an external link. |
getExternalFileName() | Get the external file name if this is an external reference. |
getSheetName() | Indicates which sheet this reference is in. |
isEntireRow() | Indicates whether this area contains all columns(entire row). |
isEntireColumn() | Indicates whether this area contains all rows(entire column). |
isArea() | Indicates whether this is an area. |
getEndColumn() | The end column of the area. |
getStartColumn() | The start column of the area. |
getEndRow() | The end row of the area. |
getStartRow() | The start row of the area. |
getValues() | Gets cell values in this area. |
getValues(boolean) | Gets cell values in this area. |
getValue(number, number) | Gets cell value with given offset from the top-left of this area. |
getValue(number, number, boolean) | Gets cell value with given offset from the top-left of this area. |
toString() | Returns the reference address of this area. Generally it is the address of the reference which may be used in formula, such as “Sheet1!A1:C3”. |
isNull() | Checks whether the implementation object is null. |
isExternalLink()
Indicates whether this is an external link.
isExternalLink() : boolean;
getExternalFileName()
Get the external file name if this is an external reference.
getExternalFileName() : string;
getSheetName()
Indicates which sheet this reference is in.
getSheetName() : string;
isEntireRow()
Indicates whether this area contains all columns(entire row).
isEntireRow() : boolean;
isEntireColumn()
Indicates whether this area contains all rows(entire column).
isEntireColumn() : boolean;
isArea()
Indicates whether this is an area.
isArea() : boolean;
Remarks
If this is not an area, only StartRow and StartColumn effect.
getEndColumn()
The end column of the area.
getEndColumn() : number;
getStartColumn()
The start column of the area.
getStartColumn() : number;
getEndRow()
The end row of the area.
getEndRow() : number;
getStartRow()
The start row of the area.
getStartRow() : number;
getValues()
Gets cell values in this area.
getValues() : object;
Returns
If this area is invalid, “#REF!” will be returned; If this area is one single cell, then return the cell value object; Otherwise return one 2D array for all values in this area.
getValues(boolean)
Gets cell values in this area.
getValues(calculateFormulas: boolean) : object;
Parameters:
Parameter | Type | Description |
---|---|---|
calculateFormulas | boolean | In this range, if there are some formulas that have not been calculated, /// this flag denotes whether those formulas should be calculated recursively |
Returns
If this area is invalid, “#REF!” will be returned; If this area is one single cell, then return the cell value object; Otherwise return one 2D array for all values in this area.
getValue(number, number)
Gets cell value with given offset from the top-left of this area.
getValue(rowOffset: number, colOffset: number) : object;
Parameters:
Parameter | Type | Description |
---|---|---|
rowOffset | number | row offset from the start row of this area |
colOffset | number | column offset from the start row of this area |
Returns
“#REF!” if this area is invalid; “#N/A” if given offset out of this area; Otherwise return the cell value at given position.
getValue(number, number, boolean)
Gets cell value with given offset from the top-left of this area.
getValue(rowOffset: number, colOffset: number, calculateFormulas: boolean) : object;
Parameters:
Parameter | Type | Description |
---|---|---|
rowOffset | number | row offset from the start row of this area |
colOffset | number | column offset from the start row of this area |
calculateFormulas | boolean | Whether calculate it recursively if the specified reference is formula |
Returns
“#REF!” if this area is invalid; “#N/A” if given offset out of this area; Otherwise return the cell value at given position.
toString()
Returns the reference address of this area. Generally it is the address of the reference which may be used in formula, such as “Sheet1!A1:C3”.
toString() : string;
Returns
the reference address of this area.
isNull()
Checks whether the implementation object is null.
isNull() : boolean;