java.lang.ObjectCollectionBase
com.aspose.cells.HyperlinkCollection
public class HyperlinkCollection
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("D:\\book1.xls");
Property Getters/Setters Summary | ||
---|---|---|
int | getCount() | → inherited from com.aspose.cells.CollectionBase |
Hyperlink | get(int index) | |
Gets the |
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. | ||
java.lang.Object | get(int index) | → 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() |
get | |
public Hyperlink get(int index) |
index
- The zero based index of the element.Method Detail |
---|
add | |
public int add(int firstRow, int firstColumn, int totalRows, int totalColumns, java.lang.String address) |
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.Example:
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) |
cellName
- Cell name.totalRows
- Number of rows in this hyperlink range.totalColumns
- Number of columns of this hyperlink range.address
- Address of the hyperlink.add | |
public int add(java.lang.String startCellName, java.lang.String endCellName, java.lang.String address, java.lang.String textToDisplay, java.lang.String screenTip) |
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.removeAt | |
public void removeAt(int index) |
index
- The zero based index of the element.clear | |
public void clear() |
iterator | → inherited from com.aspose.cells.CollectionBase |
public java.util.Iterator iterator() |
get | → inherited from com.aspose.cells.CollectionBase |
public java.lang.Object get(int index) |
contains | → inherited from com.aspose.cells.CollectionBase |
public boolean contains(java.lang.Object value) |
add | → inherited from com.aspose.cells.CollectionBase |
public int add(java.lang.Object value) |
indexOf | → inherited from com.aspose.cells.CollectionBase |
public int indexOf(java.lang.Object value) |