We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Mutiple hyperlinks in a cell

I have a project requirement which wants me to put  multiple hyperlinks in one cell.  Excel does not support  this. However, after some research, I found out that I can create list of shapes in a cell and then add individual links to them. I managed to do this in Open Xml, but the library hasn't much  out of the box the functionality I am getting using XIsIO.  After going through the XlsIO documentation, I can't  figure out how to translate my OpenXml Code to work with XlsIO. For the output below I used this snippet piece of code
                  
                   if (playList[j].Items != null) { 
                      for (var i = 0; i < playList[j].Items.Count - 1; i++) {

                     var icon = ConvertTextToImage(playList[j].Items[i].Url, "Calibri", 11, Color.White, Color.Blue, 610, 20);
                     var test = Guid.NewGuid();

                      if (icon != null)
                      { if (playList[j].Items[i].Url == null) playList[j].Items[i].Url = "";
                          ExcelPicture pic = ws1.Drawings.AddPicture("pic" + test.ToString(), icon, new ExcelHyperLink(playList[j].Items[i].Url, UriKind.Absolute));
                          pic.SetPosition(j, (int)20 * i + 2, 6, 1);
                      }
                     }
                 }

How do I achieve this  in  XIsIO.  All  I want is to assign a url to a picture  but I have hit a brick wall. The examples in the documentation show how to add hyperlinks to individual cells  and not to shapes. If this is possible, how then do I set the picture's position. Is there an example, I can use as a reference.
Sample

1 Reply

IN Ishwarya Narayanan Syncfusion Team February 18, 2016 08:45 AM UTC

Hi Abide,

 

Thank you for contacting Syncfusion support.

 

Currently we don’t have support for adding hyperlinks to an image and we have added it to our feature request list. You can follow up with the incident #151289 for further update.

 

Regards,

Ishwarya N


Loader.
Live Chat Icon For mobile
Up arrow icon