0

I'm trying to add a hyperlink to excel cell using java as follows.

XSSFCreationHelper helper= xssfWorkbook.getCreationHelper();
XSSFHyperlink url_link=helper.createHyperlink(Hyperlink.LINK_URL);
cell.setCellValue("some Text");
url_link.setAddress("www.google.com");
cell.setHyperlink(url_link);

But when I created the excel file, cell contains wrong url, something as follows.

file:///C:/Users/..../www.google.com

What is I'm doing wrong here? Appreciate any help

Channa
  • 3,267
  • 7
  • 41
  • 67

1 Answers1

0

to make it work just add http:// in-front of your url.

eg: http://www.google.com

Raghavendra
  • 3,530
  • 1
  • 17
  • 18