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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

add hyperlinks to cell

Thread ID:





101617 Nov 8,2011 02:38 PM UTC Nov 14,2011 06:45 AM UTC ASP.NET Web Forms (Classic) 3
Tags: XlsIO
Asked On November 8, 2011 02:38 PM UTC


exporting a datatable to excel sheet using ImportDataTable function and one of the column is a link.

How can i add hyperlinks to the cells after importing the data to excel?


Replied On November 11, 2011 06:46 AM UTC


can please an answer for my question.


Administrator [Syncfusion]
Replied On November 14, 2011 01:40 AM UTC

Hi Navin,

Sorry for the delayed reply.

Thank you for using Syncfusion product.

XlsIO provides interactive features support to convert the cell text to a hyperlink. Please follow the below code snippet for your requirement.

//Creating Hyperlink for a Website
IHyperLink hyperlink = worksheet.HyperLinks.Add(worksheet.Range["C5"]);
hyperlink.Type = ExcelHyperLinkType.Url;
hyperlink.Address = "http://www.syncfusion.com/products/xlsio/windows/default.aspx";
hyperlink.ScreenTip = "To know more About XlsIO go through this link";

//Creating Hyperlink for e-mail
IHyperLink hyperlink1 = worksheet.HyperLinks.Add(worksheet.Range["C7"]);
hyperlink1.Type = ExcelHyperLinkType.Url;
hyperlink1.Address = "mailto:support@syncfusion.com";
hyperlink1.ScreenTip = "Send Mail to this id for your queries";

//Creating Hyperlink for Opening Files using type as File
IHyperLink hyperlink2 = worksheet.HyperLinks.Add(worksheet.Range["C9"]);
hyperlink2.Type = ExcelHyperLinkType.File;

hyperlink2.Address = @"..\..\";
hyperlink2.ScreenTip = "File path";
hyperlink2.TextToDisplay = "Hyperlink for files using File as type";

//Creating Hyperlink for Opening Files using type as Unc
IHyperLink hyperlink3 = worksheet.HyperLinks.Add(worksheet.Range["C11"]);
hyperlink3.Type = ExcelHyperLinkType.Unc;
hyperlink3.Address = @"C:\Program Files\Syncfusion\Essential Studio";
hyperlink3.ScreenTip = "Click here for files";
hyperlink3.TextToDisplay = "Hyperlink for files using Unc as type";

//Creating Hyperlink to another cell using type as Workbook
IHyperLink hyperlink4 = worksheet.HyperLinks.Add(worksheet.Range["C13"]);
hyperlink4.Type = ExcelHyperLinkType.Workbook;
hyperlink4.Address = "Sheet1!B21";
hyperlink4.ScreenTip = "Click here";
hyperlink4.TextToDisplay = "Click here to move to the cell with Comments about XlsIO";

IHyperLink hyperlink5 = worksheet.HyperLinks.Add(worksheet.Range["C15"]);
hyperlink5.Type = ExcelHyperLinkType.Workbook;
hyperlink5.Address = "Sheet1!B23";
hyperlink5.ScreenTip = "Click here";
hyperlink5.TextToDisplay = "Click here to move to the cell with Comments about this sample";

//Disabling Hyperlink using type as None
IHyperLink hyperlink6 = worksheet.HyperLinks.Add(worksheet.Range["C17"]);
hyperlink6.Type = ExcelHyperLinkType.None;
hyperlink6.ScreenTip = "Use this Address";
hyperlink6.TextToDisplay = "www.syncfusion.com";

Note: You can find the sample program in the Syncfusion Dashboard which you have installed.

Please let me know if there is any clarification.



Hi Navin_98c707bc.zip

Sridhar [Syncfusion]
Replied On November 14, 2011 06:45 AM UTC

Hi Navin,

Please try the above given solution at your side and let us know if these helps you.

Please go through the following online doumentaion link for more details.


Please let me know if you require any further clarifications.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon