How to refer a hyperlink from another sheet in the same excel file without creating extra connection

Hi,

How to refer a hyperlink from another sheet in the same excel file without creating extra connection.

Suppose in the excel attached, I have a hyperlink in 102th row of TOC sheet. How can I refer this link in Report1 sheet and name it as "Edit Data Selections" without creating any connection in Report1 sheet.

Please provide Java aspose code for the same.

Thanks and Regards

Debidutta

Hi,


Please see the following sample code that may help you to achieve your requirement.
Sample code:
Workbook workbook = new Workbook(“test.xlsx”);
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet sheet = worksheets.get(0);
Hyperlink shyperlink = sheet.getHyperlinks().get(0);

//Get the second sheet
Worksheet sheet2 = worksheets.get(1);
sheet2.getHyperlinks().add(“A1”,1 ,1, shyperlink.getAddress());

workbook.save(“testhl_out.xlsx”);

For reference, see the document:
http://www.aspose.com/documentation/java-components/aspose.cells-for-java/adding-hyperlinks-to-link-data.html


Thank you.