1.

How Will You Add A Hyperlink To A Cell Using Apache Poi?

Answer»

XSSFHyperlink can be used to the ADD an HYPERLINK to a cell.

CreationHelper createHelper = workbook.getCreationHelper();

XSSFHyperlink link = (XSSFHyperlink)createHelper.createHyperlink(Hyperlink.LINK_URL);

link.setAddress("HTTP://www.tutorialspoint.com/" );

cell.setHyperlink((XSSFHyperlink) link);

XSSFHyperlink can be used to the add an hyperlink to a cell.

CreationHelper createHelper = workbook.getCreationHelper();

XSSFHyperlink link = (XSSFHyperlink)createHelper.createHyperlink(Hyperlink.LINK_URL);

link.setAddress("http://www.tutorialspoint.com/" );

cell.setHyperlink((XSSFHyperlink) link);



Discussion

No Comment Found