I am trying to figure out how to write a Hyperlink inside a cell using EPPlus instead of the cell containing the link text. I need it to be recognized as a link and be clickable
If you are using EPPlus and want to create a link to another sheet within the same document, then this is the proper way to do this:
var link = "Another Excel Sheet"; //Maximum length is 31 symbols
using (var excel = new ExcelPackage())
{
var ws = excel.Workbook.Worksheets.Add("Test");
ws.Cells[row, col].Hyperlink =
new ExcelHyperLink((char)39 + link + (char)39 + "!A1",
"Name of another excel sheet could be more then 31 symbols");
}
This is the proper way to create a link to another sheet within Excel document. Having using formula with HYPERLINK
function, if a file is downloaded to the client, latest Excel version will raise security warnings.