Namespace EasyXLS

Class ExcelHyperlink

System.Object
EasyXLS.ExcelHyperlink

public class ExcelHyperlink extends System.Object
This class stores the hyperlink information like position (first row, first column, last row, last column), hyperlink type, description, URL, target frame, text mark and tool tip.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Defines an instance of the Excel hyperlink.
    ExcelHyperlink​(System.String hyperlinkType, System.String url, System.String position)
    Defines an instance of the Excel hyperlink with the specified type, url and position.
    ExcelHyperlink​(System.String hyperlinkType, System.String url, System.String tooltip, System.String position)
    Defines an instance of the Excel hyperlink with the specified type, url, tooltip and position.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates and returns a copy of this object.
    System.String
    Returns the text that is shown in the table instead of the URL.
    int
    A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the first column of the area
    int
    A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the first row of the area.
    System.String
    Returns a string representing the hyperlink type.
    int
    A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the last column of the area
    int
    A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the last row of the area
    System.String
    Returns the text mark value.
    System.String
    Returns the tool tip text.
    System.String
    Return the URL value.
    void
    setDescription​(System.String value)
    Sets the text that is shown in the table instead of the URL.
    void
    setFirstColumn​(int value)
    A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the first column of the hyperlink area
    void
    setFirstRow​(int value)
    A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the first row of the hyperlink area
    void
    setHyperlink​(System.String hyperlinkType, System.String hyperlink)
    Sets the type of the hyperlink and the URL value.
    void
    setHyperlinkType​(System.String hyperlinkType)
    Sets the type of the hyperlink.
    void
    setLastColumn​(int value)
    A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the last column of the hyperlink area
    void
    setLastRow​(int value)
    A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the last row of the hyperlink area
    void
    setPosition​(int firstRow, int firstColumn, int lastRow, int lastColumn)
    A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the hyperlink area position and dimension.
    void
    setPosition​(System.String position)
    A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the hyperlink area position
    This method is overridden as setPosition_2 in COM+ version of EasyXLS.
    void
    setTextMark​(System.String value)
    Sets the text mark value.
    void
    setToolTip​(System.String value)
    Sets the tool tip text.
    void
    setURL​(System.String value)
    Sets the URL value.

    Methods inherited from class System.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExcelHyperlink

      public ExcelHyperlink()
      Defines an instance of the Excel hyperlink.
    • ExcelHyperlink

      public ExcelHyperlink(System.String hyperlinkType, System.String url, System.String position)
      Defines an instance of the Excel hyperlink with the specified type, url and position.
      Parameters:
      hyperlinkType - the hyperlink type. Possible values are available in HyperlinkType class.
      url - the URL value
      position - the area location of the hyperlink. It can be a cell reference or a range.
    • ExcelHyperlink

      public ExcelHyperlink(System.String hyperlinkType, System.String url, System.String tooltip, System.String position)
      Defines an instance of the Excel hyperlink with the specified type, url, tooltip and position.
      Parameters:
      hyperlinkType - the hyperlink type. Possible values are available in HyperlinkType class.
      url - the URL value
      tooltip - the tool tip text
      position - the area location of the hyperlink. It can be a cell reference or a range.
  • Method Details

    • setPosition

      public void setPosition(int firstRow, int firstColumn, int lastRow, int lastColumn)
      A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the hyperlink area position and dimension.
      Parameters:
      firstRow - index of the first row of the hyperlink area
      firstColumn - index of the first column of the hyperlink area
      lastRow - index of the last row of the hyperlink area
      lastColumn - index of the last column of the hyperlink area
      See Also:
      setPosition(String), getFirstRow(), getLastRow(), getFirstColumn(), getLastColumn()
    • setPosition

      public void setPosition(System.String position)
      A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the hyperlink area position
      This method is overridden as setPosition_2 in COM+ version of EasyXLS.
      Parameters:
      position - the area location of the hyperlink. It can be a cell reference or a range.
      See Also:
      setPosition(int,int,int,int), getFirstRow(), getLastRow(), getFirstColumn(), getLastColumn()
    • getFirstRow

      public int getFirstRow()
      A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the first row of the area.
      Returns:
      the index of the first row of the hyperlink area
      See Also:
      setFirstRow(int), setPosition(int, int, int, int)
    • setFirstRow

      public void setFirstRow(int value)
      A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the first row of the hyperlink area
      Parameters:
      value - the index of the first row of the hyperlink area
      See Also:
      getFirstRow(), setPosition(int, int, int, int)
    • getLastRow

      public int getLastRow()
      A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the last row of the area
      Returns:
      the index of the last row of the hyperlink area
      See Also:
      setLastRow(int), setPosition(int, int, int, int)
    • setLastRow

      public void setLastRow(int value)
      A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the last row of the hyperlink area
      Parameters:
      value - the index of the last row of the hyperlink area
      See Also:
      getLastRow(), setPosition(int, int, int, int)
    • getFirstColumn

      public int getFirstColumn()
      A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the first column of the area
      Returns:
      the index of the first column of the hyperlink area
      See Also:
      setFirstColumn(int), setPosition(int, int, int, int)
    • setFirstColumn

      public void setFirstColumn(int value)
      A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the first column of the hyperlink area
      Parameters:
      value - the index of the first column of the hyperlink area
      See Also:
      getFirstColumn(), setPosition(int, int, int, int)
    • getLastColumn

      public int getLastColumn()
      A hyperlink is set on a rectangular area that can contain more than one cell and this function returns the index of the last column of the area
      Returns:
      the index of the last column of the hyperlink area
      See Also:
      setLastColumn(int), setPosition(int, int, int, int)
    • setLastColumn

      public void setLastColumn(int value)
      A hyperlink is set on a rectangular area that can contain more than one cell and this method sets the index of the last column of the hyperlink area
      Parameters:
      value - the index of the last column of the hyperlink area
      See Also:
      getLastColumn(), setPosition(int, int, int, int)
    • getDescription

      public System.String getDescription()
      Returns the text that is shown in the table instead of the URL.
      Returns:
      the hyperlink description
      See Also:
      setDescription(System.String)
    • setDescription

      public void setDescription(System.String value)
      Sets the text that is shown in the table instead of the URL.
      Parameters:
      value - the hyperlink description
      See Also:
      getDescription()
    • getURL

      public System.String getURL()
      Return the URL value.
      • If hyperlink type is Constants.HyperlinkType.FILE, URL field contains the file path.
      • If hyperlink type is Constants.HyperlinkType.UNC, URL field contains the UNC path.
      • If hyperlink type is Constants.HyperlinkType.CELL, URL field contains an empty string.
      Returns:
      the URL value
      See Also:
      setURL(System.String)
    • setURL

      public void setURL(System.String value)
      Sets the URL value.
      • If hyperlink type is Constants.HyperlinkType.FILE, URL field must contain the file path.
      • If hyperlink type is Constants.HyperlinkType.UNC, URL field must contain the UNC path.
      • If hyperlink type is Constants.HyperlinkType.CELL, URL field must contain an empty string, but the text mark has to be set.
      Parameters:
      value - the URL value
      See Also:
      getURL(), setTextMark(System.String)
    • getTextMark

      public System.String getTextMark()
      Returns the text mark value. The text mark refers to a location inside a document. Examples of text mark:
      • http://www.webpage.com/pizza.html#section_mushrooms
      • c:\myfile.xsl#Sheet3!F6
      Returns:
      the text mark value
      See Also:
      setTextMark(System.String), setURL(System.String)
    • setTextMark

      public void setTextMark(System.String value)
      Sets the text mark value. The text mark refers to a location inside a document. Examples of text mark:
      • http://www.webpage.com/pizza.html#section_mushrooms
      • c:\myfile.xsl#Sheet3!F6
      Parameters:
      value - the text mark value
      See Also:
      getTextMark(), getURL()
    • getToolTip

      public System.String getToolTip()
      Returns the tool tip text. The tool tip is the text that pops up when the mouse is over the hyperlink.
      Returns:
      the tool tip text
      See Also:
      setToolTip(System.String)
    • setToolTip

      public void setToolTip(System.String value)
      Sets the tool tip text. The tool tip is the text that pops up when the mouse is over the hyperlink.
      Parameters:
      value - the tool tip text
      See Also:
      getToolTip()
    • getHyperlinkType

      public System.String getHyperlinkType()
      Returns a string representing the hyperlink type. Possible values are available in HyperlinkType class.
      Returns:
      the hyperlink type
      See Also:
      setHyperlinkType(System.String)
    • setHyperlinkType

      public void setHyperlinkType(System.String hyperlinkType)
      Sets the type of the hyperlink. Possible values are available in HyperlinkType class.
      Parameters:
      hyperlinkType - the hyperlink type
      See Also:
      getHyperlinkType()
    • setHyperlink

      public void setHyperlink(System.String hyperlinkType, System.String hyperlink)
      Sets the type of the hyperlink and the URL value.
      Parameters:
      hyperlinkType - the hyperlink type
      hyperlink - the URL value
      See Also:
      getHyperlinkType(), getURL(), setHyperlinkType(System.String)
    • Clone

      public ExcelHyperlink Clone()
      Creates and returns a copy of this object.
      Returns:
      a clone of this instance.