Example:
//Instantiating a Workbook object $workbook = new cells\Workbook(); //Obtaining the reference of the newly added worksheet by passing its sheet index $worksheet = $workbook->getWorksheets()->get(0); //Get Hyperlinks Collection $hyperlinks = $worksheet->getHyperlinks(); //Adding a hyperlink to a URL at "A1" cell $hyperlinks->add("A1", 1, 1, "http://www.aspose.com");
Property Getters/Setters Summary | ||
---|---|---|
function | getCount() | |
function | get(index) | |
Gets the |
Method Summary | ||
---|---|---|
function | add(firstRow, firstColumn, totalRows, totalColumns, address) | |
Adds a hyperlink to a specified cell or a range of cells.
|
||
function | add(value) | |
Reserved for internal use. |
||
function | add(cellName, totalRows, totalColumns, address) | |
Adds a hyperlink to a specified cell or a range of cells.
|
||
function | add(startCellName, endCellName, address, textToDisplay, screenTip) | |
Adds a hyperlink to a specified cell or a range of cells.
|
||
function | clear() | |
Clears all hyperlinks.
|
||
function | contains(value) | |
Reserved for internal use. |
||
function | get(index) | |
Reserved for internal use. |
||
function | indexOf(value) | |
Reserved for internal use. |
||
function | iterator() | |
function | removeAt(index) | |
Remove the hyperlink at the specified index in this collection.
|
function getCount()
function get(index)
index
- The zero based index of the element.function add(firstRow, firstColumn, totalRows, totalColumns, address)
firstRow: Number
- First row of the hyperlink range.firstColumn: Number
- First column of the hyperlink range.totalRows: Number
- Number of rows in this hyperlink range.totalColumns: Number
- Number of columns of this hyperlink range.address: String
- Address of the hyperlink.Example:
$workbook = new cells\Workbook(); $worksheet = $workbook->getWorksheets()->get(0); $worksheet->getHyperlinks()->add("A4", 1, 1, "http://www.aspose.com"); $worksheet->getHyperlinks()->add("A5", 1, 1, "c:\\book1.xls");
function add(cellName, totalRows, totalColumns, address)
cellName: String
- Cell name.totalRows: Number
- Number of rows in this hyperlink range.totalColumns: Number
- Number of columns of this hyperlink range.address: String
- Address of the hyperlink.function add(startCellName, endCellName, address, textToDisplay, screenTip)
startCellName: String
- The top-left cell of the range.endCellName: String
- The bottom-right cell of the range.address: String
- Address of the hyperlink.textToDisplay: String
- The text to be displayed for the specified hyperlink.screenTip: String
- The screenTip text for the specified hyperlink.function removeAt(index)
index: Number
- The zero based index of the element.function clear()
function iterator()
function get(index)
function contains(value)
function add(value)
function indexOf(value)