Name
Source: aspose.
Represents a defined name for a range of cells.
Methods
Methods
getComment()
Gets and sets the comment of the name. Only applies for Excel 2007 or higher versions.
getFullText()
Gets the name full text of the object with the scope setting.
getR1C1RefersTo()
Gets or sets a R1C1 reference of the Name.
getRange() → Range
Gets the range if this name refers to a range.
- Returns
-
RangeThe range.
getRange(recalculate) → Range
Gets the range if this name refers to a range
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
recalculate |
boolean |
|
whether recalculate it if this name has been calculated before this invocation. |
- Returns
-
RangeThe range.
getRange(sheetIndex, row, column) → Range
Gets the range if this name refers to a range. If the reference of this name is not absolute, the range may be different for different cell.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
sheetIndex |
Number |
|
The according sheet index. |
|
row |
Number |
|
The according row index. |
|
column |
Number |
|
The according column index |
- Returns
-
RangeThe range.
getRanges() → Array of Range
Gets all ranges referred by this name.
- Returns
-
Array of RangeAll ranges.
getRanges(recalculate) → Array of Range
Gets all ranges referred by this name.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
recalculate |
boolean |
|
whether recalculate it if this name has been calculated before this invocation. |
- Returns
-
Array of RangeAll ranges.
getReferredAreas(recalculate) → Array of ReferredArea
Gets all references referred by this name.
Parameter
| Name | Type | Optional | Description |
|---|---|---|---|
|
recalculate |
boolean |
|
whether recalculate it if this name has been calculated before this invocation. |
- Returns
-
Array of ReferredAreaAll ranges.
getRefersTo()
Returns or sets the formula that the name is defined to refer to, beginning with an equal sign.
getRefersTo(isR1C1, isLocal)
Get the reference of this Name.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
isR1C1 |
boolean |
|
Whether the reference needs to be formatted as R1C1. |
|
isLocal |
boolean |
|
Whether the reference needs to be formatted by locale. |
getRefersTo(isR1C1, isLocal, row, column)
Get the reference of this Name based on specified cell.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
isR1C1 |
boolean |
|
Whether the reference needs to be formatted as R1C1. |
|
isLocal |
boolean |
|
Whether the reference needs to be formatted by locale. |
|
row |
Number |
|
The row index of the cell. |
|
column |
Number |
|
The column index of the cell. |
getSheetIndex()
Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based)
getText()
Gets the name text of the object.
isReferred()
Indicates whether this name is referred by other formulas.
isVisible()
Indicates whether the name is visible.
setComment()
Gets and sets the comment of the name. Only applies for Excel 2007 or higher versions.
setR1C1RefersTo()
Gets or sets a R1C1 reference of the Name.
setRefersTo()
Returns or sets the formula that the name is defined to refer to, beginning with an equal sign.
setRefersTo(refersTo, isR1C1, isLocal)
Set the reference of this Name.
Parameters
| Name | Type | Optional | Description |
|---|---|---|---|
|
refersTo |
String |
|
The reference. |
|
isR1C1 |
boolean |
|
Whether the reference is R1C1 format. |
|
isLocal |
boolean |
|
Whether the reference is locale formatted. |
setSheetIndex()
Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based)
setText()
Gets the name text of the object.
setVisible()
Indicates whether the name is visible.
toString() → String
Returns a string represents the current Range object.
- Returns
-
String