Using Apache POI 3.2 to create hyperlinks in Excel
807588Apr 29 2009 — edited May 8 2009Hello,
I am new to Java.
I have written a program that accesses Excel with the Apache POI version 3.2.
All seems to work until I tried to insert a Hyperlink to a file on the local drive.
I followed the quick start guide from Apache POI.
It provides the following code but Java does not appear to find the "createHelper".
//link to a file in the current directory
cell = sheet.createRow(1).createCell((short)0);
cell.setCellValue("File Link");
link = createHelper.createHyperlink(Hyperlink.LINK_FILE);
link.setAddress("link1.xls");
cell.setHyperlink(link);
cell.setCellStyle(hlink_style);
Any ideas on how to insert a Hyperlink into Excel would be appreciated.
Thanks
Chris