I would like to add Hyperlink to a picture object? How to do this.
There is no way to specifiy Picture object when adding Hyperlink. All I can specifiy
is only row number and column number.
I am aligning this picture with a Cell. I tried to add Hyperlink to that cell.
But Hyperlink is not working.
Please try the following sample code:
Worksheet worksheet = excel.Worksheets;
worksheet.Hyperlinks.AddInternalLink("A1", 1, 1, "Sheet2!B2");
A1 is the cell which contains the hyperlink. B2 of Sheet2 is the cell which contains the picture.
Thanks for your reply.
I think you have misunderstood my question. I don’t want to give a hyperlink
to the image in the worksheet, instead I want to add a hyperlink to the Image object, so that when user clicks the image object, the link has to be opened( just like adding hyperlink in the Cell) in the browser.
Right now I have placed this image over a cell and I have added hyperlink
object to that cell. But when user moves mouse over this image “Cross Hair” is displayed rather Hyperlink symbol. But in MS Excel, I can right click on the Image object and add hyperlink to it. I don’t see any corresponding API in your library
to do the same.
Currently a hyperlink on an image object is not supported yet. I will check this feature.