Syncfusion.XlsIO.Base
Example 


Hyperlink Property (IShape)

Get object that represents the IHyperLink for the shape.
Syntax
'Declaration
 
ReadOnly Property Hyperlink As IHyperLink
'Usage
 
Dim instance As IShape
Dim value As IHyperLink
 
value = instance.Hyperlink
IHyperLink Hyperlink {get;}
Remarks
To know more about HyperLinks refer Hyperlinks on Shapes.
Example
The following code illustrates how to set and access HyperLink in Shapes.
using Syncfusion.XlsIO;
using System;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add shape
            IShape shape = worksheet.Shapes.AddAutoShapes(AutoShapeType.Rectangle, 2, 2, 40, 100);
            
            //Add hyperlink
            IHyperLink hyperLink = worksheet.HyperLinks.Add(shape, ExcelHyperLinkType.Url, "http://www.syncfusion.com", "Syncfusion");
            
            //Set hyperlink
            IHyperLink link = shape.Hyperlink;
            
            //Get address
            Console.Write(link.Address);
            
            //Save and dispose
            workbook.SaveAs("Shapes.xlsx");
            workbook.Close();
            Console.ReadKey();
        }
    }
}
//Output will be
//http://www.syncfusion.com
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also