@@ -2380,7 +2380,156 @@ Hyperlink can be created in a workbook to provide quick access to web pages, pla
23802380* E-mail
23812381* External files
23822382
2383- The following code example illustrates how to insert various hyperlinks.
2383+ ### Website URL Hyperlink
2384+
2385+ {% tabs %}
2386+ {% highlight c# tabtitle="C# [ Cross-platform] " %}
2387+ //Creating a Hyperlink for a Website
2388+ IHyperLink hyperlink = sheet.HyperLinks.Add(sheet.Range[ "C5"] );
2389+ hyperlink.Type = ExcelHyperLinkType.Url;
2390+ hyperlink.Address = "http://www.syncfusion.com ";
2391+ hyperlink.ScreenTip = "To know more about Syncfusion products, go through this link.";
2392+ {% endhighlight %}
2393+
2394+ {% highlight c# tabtitle="C# [ Windows-specific] " %}
2395+ //Creating a Hyperlink for a Website
2396+ IHyperLink hyperlink = sheet.HyperLinks.Add(sheet.Range[ "C5"] );
2397+ hyperlink.Type = ExcelHyperLinkType.Url;
2398+ hyperlink.Address = "http://www.syncfusion.com ";
2399+ hyperlink.ScreenTip = "To know more about Syncfusion products, go through this link.";
2400+ {% endhighlight %}
2401+
2402+ {% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
2403+ 'Creating a Hyperlink for a Website
2404+ Dim hyperlink As IHyperLink = sheet.HyperLinks.Add(sheet.Range("C5"))
2405+ hyperlink.Type = ExcelHyperLinkType.Url
2406+ hyperlink.Address = "http://www.Syncfusion.com "
2407+ hyperlink.ScreenTip = "To know more about Syncfusion products, go through this link."
2408+ {% endhighlight %}
2409+ {% endtabs %}
2410+
2411+ ### E-mail hyperlink
2412+
2413+ {% tabs %}
2414+ {% highlight c# tabtitle="C# [ Cross-platform] " %}
2415+ //Creating a Hyperlink for e-mail
2416+ IHyperLink hyperlink1 = sheet.HyperLinks.Add(sheet.Range[ "C7"] );
2417+ hyperlink1.Type = ExcelHyperLinkType.Url;
2418+ hyperlink1.Address = "mailto:Username@syncfusion.com ";
2419+ hyperlink1.ScreenTip = "Send Mail";
2420+ {% endhighlight %}
2421+
2422+ {% highlight c# tabtitle="C# [ Windows-specific] " %}
2423+ //Creating a Hyperlink for e-mail
2424+ IHyperLink hyperlink1 = sheet.HyperLinks.Add(sheet.Range[ "C7"] );
2425+ hyperlink1.Type = ExcelHyperLinkType.Url;
2426+ hyperlink1.Address = "mailto:Username@syncfusion.com ";
2427+ hyperlink1.ScreenTip = "Send Mail";
2428+ {% endhighlight %}
2429+
2430+ {% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
2431+ 'Creating a Hyperlink for e-mail
2432+ Dim hyperlink1 As IHyperLink = sheet.HyperLinks.Add(sheet.Range("C7"))
2433+ hyperlink1.Type = ExcelHyperLinkType.Url
2434+ hyperlink1.Address = "mailto:Username@syncfusion.com "
2435+ hyperlink1.ScreenTip = "Send Mail"
2436+ {% endhighlight %}
2437+ {% endtabs %}
2438+
2439+ ### File Opening Hyperlink
2440+
2441+ {% tabs %}
2442+ {% highlight c# tabtitle="C# [ Cross-platform] " %}
2443+ //Creating a Hyperlink for Opening Files using type as File
2444+ IHyperLink hyperlink2 = sheet.HyperLinks.Add(sheet.Range[ "C9"] );
2445+ hyperlink2.Type = ExcelHyperLinkType.File;
2446+ hyperlink2.Address = "C:/Program files";
2447+ hyperlink2.ScreenTip = "File path";
2448+ hyperlink2.TextToDisplay = "Hyperlink for files using File as type";
2449+ {% endhighlight %}
2450+
2451+ {% highlight c# tabtitle="C# [ Windows-specific] " %}
2452+ //Creating a Hyperlink for Opening Files using type as File
2453+ IHyperLink hyperlink2 = sheet.HyperLinks.Add(sheet.Range[ "C9"] );
2454+ hyperlink2.Type = ExcelHyperLinkType.File;
2455+ hyperlink2.Address = "C:/Program files";
2456+ hyperlink2.ScreenTip = "File path";
2457+ hyperlink2.TextToDisplay = "Hyperlink for files using File as type";
2458+ {% endhighlight %}
2459+
2460+ {% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
2461+ 'Creating a Hyperlink for Opening Files using type as File
2462+ Dim hyperlink2 As IHyperLink = sheet.HyperLinks.Add(sheet.Range("C9"))
2463+ hyperlink2.Type = ExcelHyperLinkType.File
2464+ hyperlink2.Address = "C:/Program files"
2465+ hyperlink2.ScreenTip = "File path"
2466+ hyperlink2.TextToDisplay = "Hyperlink for files using File as type"
2467+ {% endhighlight %}
2468+ {% endtabs %}
2469+
2470+ ### File opening hyperlink with Unc
2471+
2472+ {% tabs %}
2473+ {% highlight c# tabtitle="C# [ Cross-platform] " %}
2474+ //Creating a Hyperlink for Opening Files using type as Unc
2475+ IHyperLink hyperlink3 = sheet.HyperLinks.Add(sheet.Range[ "C11"] );
2476+ hyperlink3.Type = ExcelHyperLinkType.Unc;
2477+ hyperlink3.Address = "C:/Documents and Settings";
2478+ hyperlink3.ScreenTip = "Click here for files";
2479+ hyperlink3.TextToDisplay = "Hyperlink for files using Unc as type";
2480+ {% endhighlight %}
2481+
2482+ {% highlight c# tabtitle="C# [ Windows-specific] " %}
2483+ //Creating a Hyperlink for Opening Files using type as Unc
2484+ IHyperLink hyperlink3 = sheet.HyperLinks.Add(sheet.Range[ "C11"] );
2485+ hyperlink3.Type = ExcelHyperLinkType.Unc;
2486+ hyperlink3.Address = "C:/Documents and Settings";
2487+ hyperlink3.ScreenTip = "Click here for files";
2488+ hyperlink3.TextToDisplay = "Hyperlink for files using Unc as type";
2489+ {% endhighlight %}
2490+
2491+ {% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
2492+ 'Creating a Hyperlink for Opening Files using type as Unc
2493+ Dim hyperlink3 As IHyperLink = sheet.HyperLinks.Add(sheet.Range("C11"))
2494+ hyperlink3.Type = ExcelHyperLinkType.Unc
2495+ hyperlink3.Address = "C:/Documents and Settings"
2496+ hyperlink3.ScreenTip = "Click here for files"
2497+ hyperlink3.TextToDisplay = "Hyperlink for files using Unc as type"
2498+ {% endhighlight %}
2499+ {% endtabs %}
2500+
2501+ ### Worksheet Cell Hyperlink
2502+
2503+ {% tabs %}
2504+ {% highlight c# tabtitle="C# [ Cross-platform] " %}
2505+ //Creating a Hyperlink to another cell using type as Workbook
2506+ IHyperLink hyperlink4 = sheet.HyperLinks.Add(sheet.Range[ "C13"] );
2507+ hyperlink4.Type = ExcelHyperLinkType.Workbook;
2508+ hyperlink4.Address = "Sheet1!A15";
2509+ hyperlink4.ScreenTip = "Click here";
2510+ hyperlink4.TextToDisplay = "Hyperlink to cell A15";
2511+ {% endhighlight %}
2512+
2513+ {% highlight c# tabtitle="C# [ Windows-specific] " %}
2514+ //Creating a Hyperlink to another cell using type as Workbook
2515+ IHyperLink hyperlink4 = sheet.HyperLinks.Add(sheet.Range[ "C13"] );
2516+ hyperlink4.Type = ExcelHyperLinkType.Workbook;
2517+ hyperlink4.Address = "Sheet1!A15";
2518+ hyperlink4.ScreenTip = "Click here";
2519+ hyperlink4.TextToDisplay = "Hyperlink to cell A15";
2520+ {% endhighlight %}
2521+
2522+ {% highlight vb.net tabtitle="VB.NET [ Windows-specific] " %}
2523+ 'Creating a Hyperlink to another cell using type as Workbook
2524+ Dim hyperlink4 As IHyperLink = sheet.HyperLinks.Add(sheet.Range("C13"))
2525+ hyperlink4.Type = ExcelHyperLinkType.Workbook
2526+ hyperlink4.Address = "Sheet1!A15"
2527+ hyperlink4.ScreenTip = "Click here"
2528+ hyperlink4.TextToDisplay = "Hyperlink to cell A15"
2529+ {% endhighlight %}
2530+ {% endtabs %}
2531+
2532+ The complete code snippet illustrating the above options is shown below.
23842533
23852534{% tabs %}
23862535{% highlight c# tabtitle="C# [ Cross-platform] " %}
0 commit comments