asposecells.api

Class HyperlinkCollection

Encapsulates a collection of Hyperlink objects.

Example:

# Instantiating a Workbook object
workbook = 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")

# Saving the Excel file
workbook.save("Book1.xls")

Property Getters/Setters Summary
methodgetCount()
methodget(index)
Gets the Hyperlink element at the specified index.
 
Method Summary
methodadd(firstRow, firstColumn, totalRows, totalColumns, address)
Adds a hyperlink to a specified cell or a range of cells.
methodadd(value)
Reserved for internal use.
methodadd(cellName, totalRows, totalColumns, address)
Adds a hyperlink to a specified cell or a range of cells.
methodadd(startCellName, endCellName, address, textToDisplay, screenTip)
Adds a hyperlink to a specified cell or a range of cells.
methodclear()
Clears all hyperlinks.
methodcontains(value)
Reserved for internal use.
methodget(index)
Reserved for internal use.
methodindexOf(value)
Reserved for internal use.
methoditerator()
methodremoveAt(index)
Remove the hyperlink at the specified index.
 

    • Property Getters/Setters Detail

      • getCount : int 

        int getCount()
        
      • get : Hyperlink 

        Hyperlink 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

        int add(firstRow, firstColumn, totalRows, totalColumns, address)
        Adds a hyperlink to a specified cell or a range of cells.
        Parameters:
        firstRow: int - First row of the hyperlink range.
        firstColumn: int - First column of the hyperlink range.
        totalRows: int - Number of rows in this hyperlink range.
        totalColumns: int - Number of columns of this hyperlink range.
        address: String - Address of the hyperlink.
        Returns:
        Hyperlink object index.

        Example:

        excel = Workbook()
        worksheet = excel.getWorksheets().get(0)
        worksheet.getHyperlinks().add("A4", 1, 1, "http://www.aspose.com")
        worksheet.getHyperlinks().add("A5", 1, 1, "Book1.xls")
      • add

        int add(cellName, totalRows, totalColumns, address)
        Adds a hyperlink to a specified cell or a range of cells.
        Parameters:
        cellName: String - Cell name.
        totalRows: int - Number of rows in this hyperlink range.
        totalColumns: int - Number of columns of this hyperlink range.
        address: String - Address of the hyperlink.
        Returns:
        Hyperlink object index.
      • add

        int 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

         removeAt(index)
        Remove the hyperlink at the specified index.
        Parameters:
        index: int - The zero based index of the element.
      • clear

         clear()
        Clears all hyperlinks.
      • iterator

        Iterator iterator()
      • get

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

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

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

        int indexOf(value)
        Reserved for internal use.