I am trying to create a hyperlink using the following code
CreationHelper createHelper = wb.getCreationHelper(); cell.setCellValue("Click Here"); Hyperlink link = createHelper.createHyperlink(Hyperlink.LINK_FILE); File f = new File("C:\\Test\\1.pdf"); link.setAddress(f.getCanonicalPath()); cell.setHyperlink((org.apache.poi.ss.usermodel.Hyperlink) link);
It works fine and adds a Click Here link to the cell
But how can I set partial text and link using the same type of code,
I mean, the link should be like your file is here , where only the link is here
source share