Hyperlinks in cells
Output: HyperlinksCell.xlsx
public void Run()
{
var workbook = new Workbook();
var worksheet = workbook.Worksheets[0];
var sheet2 = workbook.AddWorksheet("Sheet2");
worksheet.Columns["A"].WidthPixels = 150;
worksheet["A1"].Value = "Example Domain";
worksheet["A1"].Hyperlink = new Hyperlink(@"http://www.example.org/","Example Domain"){IsExternal = true};
worksheet["A3"].Value = "Send mail to DR-IT";
worksheet["A3"].Hyperlink = new Hyperlink("mailto:info@dritsoftware.com", "Send mail to DR-IT") { IsExternal = true };
worksheet["A5"].Value = "Go to Sheet2!A1";
worksheet["A5"].Hyperlink = new Hyperlink("Sheet2!A1", "Go to Sheet2!A1"){Tooltip = "Go to Sheet2!A1" };
workbook.SaveAs("HyperlinksCell.xlsx");
}