JavaScript is disabled on your browser.
java.lang.Object
CollectionBase
com.aspose.cells.HyperlinkCollection
All Implemented Interfaces: java.lang.Iterable
public class HyperlinkCollection extends CollectionBase
Encapsulates a collection of Hyperlink objects.
Example:
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.getWorksheets().get(0);
//Get Hyperlinks Collection
HyperlinkCollection 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
int
getCount ()
→ inherited from com.aspose.cells.CollectionBase
Hyperlink
get (int)
Gets the Hyperlink element at the specified index.
Method Summary
int
add (int firstRow, int firstColumn, int totalRows, int totalColumns, java.lang.String address)
Adds a hyperlink to a specified cell or a range of cells.
int
add (java.lang.Object value)
→ inherited from com.aspose.cells.CollectionBase
Reserved for internal use.
int
add (java.lang.String cellName, int totalRows, int totalColumns, java.lang.String address)
Adds a hyperlink to a specified cell or a range of cells.
int
add (java.lang.String startCellName, java.lang.String endCellName, java.lang.String address, java.lang.String textToDisplay, java.lang.String screenTip)
Adds a hyperlink to a specified cell or a range of cells.
void
clear ()
Clears all hyperlinks.
boolean
contains (java.lang.Object value)
→ inherited from com.aspose.cells.CollectionBase
Reserved for internal use.
int
indexOf (java.lang.Object value)
→ inherited from com.aspose.cells.CollectionBase
Reserved for internal use.
java.util.Iterator
iterator ()
→ inherited from com.aspose.cells.CollectionBase
void
removeAt (int index)
Remove the hyperlink at the specified index.
Property Getters/Setters Detail
getCount → inherited from com.aspose.cells.CollectionBase
public int getCount ()
Gets the Hyperlink element at the specified index.
Parameters: index
- The zero based index of the element.Returns: The element at the specified index.
add
public int add (int firstRow, int firstColumn, int totalRows, int totalColumns, java.lang.String address)
Adds a hyperlink to a specified cell or a range of cells.
Parameters: firstRow
- First row of the hyperlink range.firstColumn
- First column of the hyperlink range.totalRows
- Number of rows in this hyperlink range.totalColumns
- Number of columns of this hyperlink range.address
- Address of the hyperlink.Returns: Hyperlink object index.Example:
//Instantiating a Workbook object
Workbook excel = new Workbook();
Worksheet worksheet = excel.getWorksheets().get(0);
worksheet.getHyperlinks().add("A4", 1, 1, "http://www.aspose.com");
worksheet.getHyperlinks().add("A5", 1, 1, "c:\\book1.xls");
add
public int add (java.lang.String cellName, int totalRows, int totalColumns, java.lang.String address)
Adds a hyperlink to a specified cell or a range of cells.
Parameters: cellName
- Cell name.totalRows
- Number of rows in this hyperlink range.totalColumns
- Number of columns of this hyperlink range.address
- Address of the hyperlink.Returns: Hyperlink object index.
add
public int add (java.lang.String startCellName, java.lang.String endCellName, java.lang.String address, java.lang.String textToDisplay, java.lang.String screenTip)
Adds a hyperlink to a specified cell or a range of cells.
Parameters: startCellName
- The top-left cell of the range.endCellName
- The bottom-right cell of the range.address
- Address of the hyperlink.textToDisplay
- The text to be displayed for the specified hyperlink.screenTip
- The screenTip text for the specified hyperlink.Returns: Hyperlink object index.
removeAt
public void removeAt (int index)
Remove the hyperlink at the specified index.
Parameters: index
- The zero based index of the element.
clear
public void clear ()
Clears all hyperlinks.
iterator → inherited from com.aspose.cells.CollectionBase
public java.util.Iterator iterator ()
contains → inherited from com.aspose.cells.CollectionBase
public boolean contains (java.lang.Object value)
Reserved for internal use.
add → inherited from com.aspose.cells.CollectionBase
public int add (java.lang.Object value)
Reserved for internal use.
indexOf → inherited from com.aspose.cells.CollectionBase
public int indexOf (java.lang.Object value)
Reserved for internal use.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.