1
Vote

Adding hyperlink to ExcelRange overwrites Value

description

I use the ExcelRange.Hyperlink property to add a link to text in a cell. It worked in my old project but in a new project (with a fresh load from NuGet) it replaces the text with the link text and then adds the hyperlink rather than adding the link TO the text.

So it used to be

"link"

where "link has a link to a URL"

now it says:

"http://www.abc.com"

and the cell is still a link, but the text "link" has been replaced with the URL as well.

My code is as simple as this:
function addLink (cell as ExcelRange)
cell.Value = "link"
cell.Hyperlink = New Uri("http://www.abc.com")
end function

comments