HyperlinkCollection

HyperlinkCollection class

Encapsulates a collection of Hyperlink objects.

Properties

NameTypeDescription
CountNumber
Item (int)HyperlinkGets the Hyperlink element at the specified index.

Methods

NameDescription
addAdds a hyperlink to a specified cell or a range of cells.
removeAtRemove the hyperlink at the specified index in this collection.
clearClears all hyperlinks.
iterator
getReserved for internal use.
containsReserved for internal use.
indexOfReserved for internal use.

HyperlinkCollection.Count property

Type: Number

HyperlinkCollection.Item (int) property

Gets the Hyperlink element at the specified index.

Type: Hyperlink

add(firstRow, firstColumn, totalRows, totalColumns, address) (1 of 4)

Adds a hyperlink to a specified cell or a range of cells.

ParameterTypeDescription
firstRowNumberFirst row of the hyperlink range.
firstColumnNumberFirst column of the hyperlink range.
totalRowsNumberNumber of rows in this hyperlink range.
totalColumnsNumberNumber of columns of this hyperlink range.
addressStringAddress of the hyperlink.

Returns: Hyperlink object index.

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");

add(cellName, totalRows, totalColumns, address) (2 of 4)

Adds a hyperlink to a specified cell or a range of cells.

ParameterTypeDescription
cellNameStringCell name.
totalRowsNumberNumber of rows in this hyperlink range.
totalColumnsNumberNumber of columns of this hyperlink range.
addressStringAddress of the hyperlink.

Returns: Hyperlink object index.


add(startCellName, endCellName, address, textToDisplay, screenTip) (3 of 4)

Adds a hyperlink to a specified cell or a range of cells.

ParameterTypeDescription
startCellNameStringThe top-left cell of the range.
endCellNameStringThe bottom-right cell of the range.
addressStringAddress of the hyperlink.
textToDisplayStringThe text to be displayed for the specified hyperlink.
screenTipStringThe screenTip text for the specified hyperlink.

Returns: Hyperlink object index.


add(value) (4 of 4)

Reserved for internal use.

removeAt(index)

Remove the hyperlink at the specified index in this collection.

ParameterTypeDescription
indexNumberThe zero based index of the element.

clear()

Clears all hyperlinks.

iterator()

get(index)

Reserved for internal use.

contains(value)

Reserved for internal use.

indexOf(value)

Reserved for internal use.