aspose.cells

Class HyperlinkCollection

Encapsulates a collection of Hyperlink objects.

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
functiongetCount()
functionget(index)
Gets the Hyperlink element at the specified index.
 
Method Summary
functionadd(firstRow, firstColumn, totalRows, totalColumns, address)
Adds a hyperlink to a specified cell or a range of cells.
functionadd(value)
Reserved for internal use.
functionadd(cellName, totalRows, totalColumns, address)
Adds a hyperlink to a specified cell or a range of cells.
functionadd(startCellName, endCellName, address, textToDisplay, screenTip)
Adds a hyperlink to a specified cell or a range of cells.
functionclear()
Clears all hyperlinks.
functioncontains(value)
Reserved for internal use.
functionget(index)
Reserved for internal use.
functionindexOf(value)
Reserved for internal use.
functioniterator()
functionremoveAt(index)
Remove the hyperlink at the specified index in this collection.
 

    • Property Getters/Setters Detail

      • getCount : Number 

        function getCount()
        
      • get : Hyperlink 

        function get(index)
        
        Gets the Hyperlink element at the specified index.
        Parameters:
        index - The zero based index of the element.
        Returns:
        The element at the specified index.
    • Method Detail

      • add

        function add(firstRow, firstColumn, totalRows, totalColumns, address)
        Adds a hyperlink to a specified cell or a range of cells.
        Parameters:
        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.
        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

        function add(cellName, totalRows, totalColumns, address)
        Adds a hyperlink to a specified cell or a range of cells.
        Parameters:
        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.
        Returns:
        Hyperlink object index.
      • add

        function add(startCellName, endCellName, address, textToDisplay, screenTip)
        Adds a hyperlink to a specified cell or a range of cells.
        Parameters:
        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.
        Returns:
        Hyperlink object index.
      • removeAt

        function removeAt(index)
        Remove the hyperlink at the specified index in this collection.
        Parameters:
        index: Number - The zero based index of the element.
      • clear

        function clear()
        Clears all hyperlinks.
      • iterator

        function iterator()
      • get

        function get(index)
        Reserved for internal use.
      • contains

        function contains(value)
        Reserved for internal use.
      • add

        function add(value)
        Reserved for internal use.
      • indexOf

        function indexOf(value)
        Reserved for internal use.