public class Hyperlink
extends java.lang.Object
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
int index = worksheet.getHyperlinks().add("A1", 1, 1, "http://www.aspose.com");
//Getting a Hyperlink by index.
Hyperlink hyperlink = worksheet.getHyperlinks().get(index);
//Setting display text of this hyperlink.
hyperlink.setTextToDisplay("Aspose");
//Saving the Excel file
workbook.save("book1.xls");
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Deletes this hyperlink
|
java.lang.String |
getAddress()
Represents the address of a hyperlink.
|
CellArea |
getArea()
Gets the range of hyperlink.
|
int |
getLinkType()
Gets the link type.
|
java.lang.String |
getScreenTip()
Returns or sets the ScreenTip text for the specified hyperlink.
|
java.lang.String |
getTextToDisplay()
Represents the text to be displayed for the specified hyperlink.
|
void |
setAddress(java.lang.String value)
Represents the address of a hyperlink.
|
void |
setScreenTip(java.lang.String value)
Returns or sets the ScreenTip text for the specified hyperlink.
|
void |
setTextToDisplay(java.lang.String value)
Represents the text to be displayed for the specified hyperlink.
|
public java.lang.String getAddress()
public void setAddress(java.lang.String value)
public java.lang.String getTextToDisplay()
public void setTextToDisplay(java.lang.String value)
public CellArea getArea()
public java.lang.String getScreenTip()
public void setScreenTip(java.lang.String value)
public int getLinkType()
See TargetModeType.
public void delete()
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.