Programatically Creating a Hyperlink Using VB.Net ?

E

eBob.com

I am going nuts trying to create a spreadsheet using VB.Net. It all
seems to work EXCEPT for a column which has to contain a hyperlink.
I've spent more than 6 hours researching this but just haven't found
the right incantation. Here's the VB.Net code which puts a row of
data to Excel ...

astrRow(0) = oc.name
astrRow(1) = oc.tel
astrRow(2) = oc.tel2
astrRow(3) = oc.age
astrRow(4) = oc.mts
astrRow(5) = "=HYPERLINK(""" & oc.PhotoUrl & """)"
'astrRow(5) = oc.PhotoUrl
'astrRow(5) = "=HYPERLINK(""" & oc.PhotoUrl & """,""" &
oc.PhotoUrl & """)"
XLRow += 1
objSheet.Range("A" & XLRow.ToString, "F" &
XLRow.ToString).Value = astrRow

What I see in column F of the spreadsheet is ...

=HYPERLINK("http://www.confidentialwebsite.com/s_01.jpg")

Clicking on one of these cells generally does nothing. Sometimes if I
make a trivial editing change to one of these cells then Excel will
display the cell as a hyperlink but it is still unable to actually
follow the link.

PLEASE ... if you can help me resolve this I would sure appreciate it.

Thanks, Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top