// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); worksheet.getRange("A:A").setColumnWidth(30); //add a hyperlink link to web page. worksheet.getRange("A1:B2").getHyperlinks().add(worksheet.getRange("A1"), "https://www.google.com/", null, "open google web site.", "Google"); //add a hyperlink link to a range in this document. worksheet.getRange("A3:B4").getHyperlinks().add(worksheet.getRange("A3"), null, "Sheet1!$C$3:$E$4", "Go to sheet1 C3:E4", "Sheet1!$C$3:$E$4"); //add a hyperlink link to email address. worksheet.getRange("A5:B6").getHyperlinks().add(worksheet.getRange("A5"), "mailto:us.sales@mescius.com", null, "Send an email to sales", "Send an email to sales"); //add a hyperlink link to external file. //change the path to real picture file path. String path = "external.xlsx"; worksheet.getRange("A7:B8").getHyperlinks().add(worksheet.getRange("A7"), path, null, "link to external.xlsx file.", "External.xlsx"); // Save to an excel file workbook.save("CreateHyperlinks.xlsx");