Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using Apache POI 3.2 to create hyperlinks in Excel

807588Apr 29 2009 — edited May 8 2009
Hello,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2009
Added on Apr 29 2009
1 comment
977 views