Example:
//Instantiating a Workbook object $workbook = new cells\Workbook(); //Accessing the first worksheet in the Excel file $worksheet = $workbook->getWorksheets()->get(0); //Creating a named range $range = $worksheet->getCells()->createRange("B4", "G14"); //Setting the name of the named range $range->setName("TestRange");
Property Getters/Setters Summary | ||
---|---|---|
function | getComment() | |
function | setComment(value) | |
Gets and sets the comment of the name. Only applies for Excel 2007. | ||
function | getFullText() | |
Gets the name full text of the object with the scope setting.
|
||
function | isReferred() | |
Indicates whether this name is referred by other formulas.
|
||
function | isVisible() | |
function | setVisible(value) | |
Indicates whether the name is visible. | ||
function | getR1C1RefersTo() | |
function | setR1C1RefersTo(value) | |
Gets or sets a R1C1 reference of the |
||
function | getRefersTo() | |
function | setRefersTo(value) | |
Returns or sets the formula that the name is defined to refer to, beginning with an equal sign. | ||
function | getSheetIndex() | |
function | setSheetIndex(value) | |
Indicates this name belongs to Workbook or Worksheet. 0 = Global name, otherwise index to sheet (one-based) | ||
function | getText() | |
function | setText(value) | |
Gets the name text of the object. |
Method Summary | ||
---|---|---|
function | getRange() | |
Gets the range if this name refers to a range.
|
||
function | getRange(recalculate) | |
Gets the range if this name refers to a range
|
||
function | getRange(sheetIndex, row, column) | |
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.
|
||
function | getRanges() | |
Gets all ranges referred by this name.
|
||
function | getRanges(recalculate) | |
Gets all ranges referred by this name.
|
||
function | getReferredAreas(recalculate) | |
Gets all references referred by this name.
|
||
function | getRefersTo(isR1C1, isLocal) | |
Get the reference of this Name.
|
||
function | getRefersTo(isR1C1, isLocal, row, column) | |
Get the reference of this Name based on specified cell.
|
||
function | setRefersTo(refersTo, isR1C1, isLocal) | |
Set the reference of this Name.
|
||
function | toString() | |
Returns a string represents the current Range object.
|
function getComment() / function setComment(value)
function getText() / function setText(value)
function getFullText()
function getRefersTo() / function setRefersTo(value)
function getR1C1RefersTo() / function setR1C1RefersTo(value)
function isReferred()
function isVisible() / function setVisible(value)
function getSheetIndex() / function setSheetIndex(value)
function getRefersTo(isR1C1, isLocal)
isR1C1: boolean
- Whether the reference needs to be formatted as R1C1.isLocal: boolean
- Whether the reference needs to be formatted by locale.function getRefersTo(isR1C1, isLocal, row, column)
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.function setRefersTo(refersTo, isR1C1, isLocal)
refersTo: String
- The reference.isR1C1: boolean
- Whether the reference is R1C1 format.isLocal: boolean
- Whether the reference is locale formatted.function toString()
function getRanges()
function getRanges(recalculate)
recalculate: boolean
- whether recalculate it if this name has been calculated before this invocation.function getReferredAreas(recalculate)
recalculate: boolean
- whether recalculate it if this name has been calculated before this invocation.function getRange()
function getRange(recalculate)
recalculate: boolean
- whether recalculate it if this name has been calculated before this invocation.function getRange(sheetIndex, row, column)
sheetIndex: Number
- The according sheet index.row: Number
- The according row index.column: Number
- The according column index