com.aspose.cells

Class Hyperlink

  • java.lang.Object
    • com.aspose.cells.Hyperlink
public class Hyperlink 
extends java.lang.Object

Encapsulates the object that represents a hyperlink.

Example:

//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Adding a new worksheet to the Workbook object
workbook.getWorksheets().add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.getWorksheets().get(0);
//Adding a hyperlink to a URL at "A1" cell
worksheet.getHyperlinks().add("A1", 1, 1, "http://www.aspose.com");
//Saving the Excel file
workbook.save("C:\\book1.xls");

Property Getters/Setters Summary
java.lang.StringgetAddress()
void
setAddress(java.lang.Stringvalue)
           Represents the address of a hyperlink.
CellAreagetArea()
Gets the range of hyperlink.
intgetLinkType()
Gets the link type. The value of the property is TargetModeType integer constant.
java.lang.StringgetScreenTip()
void
setScreenTip(java.lang.Stringvalue)
           Returns or sets the ScreenTip text for the specified hyperlink.
java.lang.StringgetTextToDisplay()
void
setTextToDisplay(java.lang.Stringvalue)
           Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
 
Method Summary
voiddelete()
Deletes this hyperlink
 

    • Property Getters/Setters Detail

      • getAddress/setAddress

        public java.lang.String getAddress() / public void setAddress(java.lang.String value)
        
        Represents the address of a hyperlink.
      • getTextToDisplay/setTextToDisplay

        public java.lang.String getTextToDisplay() / public void setTextToDisplay(java.lang.String value)
        
        Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
      • getArea

        public CellArea getArea()
        
        Gets the range of hyperlink.
      • getScreenTip/setScreenTip

        public java.lang.String getScreenTip() / public void setScreenTip(java.lang.String value)
        
        Returns or sets the ScreenTip text for the specified hyperlink.
      • getLinkType

        public int getLinkType()
        
        Gets the link type. The value of the property is TargetModeType integer constant.

    setAddress

    public voidsetAddress(java.lang.Stringvalue)
    
    Represents the address of a hyperlink.

    setTextToDisplay

    public voidsetTextToDisplay(java.lang.Stringvalue)
    
    Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.

    setScreenTip

    public voidsetScreenTip(java.lang.Stringvalue)
    
    Returns or sets the ScreenTip text for the specified hyperlink.
    • Method Detail

      • delete

        public void delete()
        Deletes this hyperlink