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 | ||
---|---|---|
method | getCount() | |
method | get(index) | |
Gets the |
Method Summary | ||
---|---|---|
method | add(firstRow, firstColumn, totalRows, totalColumns, address) | |
Adds a hyperlink to a specified cell or a range of cells.
|
||
method | add(value) | |
Reserved for internal use. |
||
method | add(cellName, totalRows, totalColumns, address) | |
Adds a hyperlink to a specified cell or a range of cells.
|
||
method | add(startCellName, endCellName, address, textToDisplay, screenTip) | |
Adds a hyperlink to a specified cell or a range of cells.
|
||
method | clear() | |
Clears all hyperlinks.
|
||
method | contains(value) | |
Reserved for internal use. |
||
method | get(index) | |
Reserved for internal use. |
||
method | indexOf(value) | |
Reserved for internal use. |
||
method | iterator() | |
method | removeAt(index) | |
Remove the hyperlink at the specified index in this collection.
|
int getCount()
Hyperlink get(index)
index
- The zero based index of the element.int add(firstRow, firstColumn, totalRows, totalColumns, address)
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.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")
int add(cellName, totalRows, totalColumns, address)
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.int add(startCellName, endCellName, address, textToDisplay, screenTip)
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.removeAt(index)
index: int
- The zero based index of the element.clear()
Iterator iterator()
Object get(index)
boolean contains(value)
int add(value)
int indexOf(value)