diff --git a/ClosedXML_Examples/Misc/Hyperlinks.cs b/ClosedXML_Examples/Misc/Hyperlinks.cs index e40d32a..1dca03e 100644 --- a/ClosedXML_Examples/Misc/Hyperlinks.cs +++ b/ClosedXML_Examples/Misc/Hyperlinks.cs @@ -91,6 +91,11 @@ ws.Cell(ro, 1).Style.Font.FontColor = XLColor.Red; ws.Cell(ro, 1).Style.Font.Underline = XLFontUnderlineValues.Double; ws.Cell(ro, 1).Hyperlink = new XLHyperlink(ws.Range("B1:C2")); + + // Hyperlink via formula + ws.Cell( ++ro, 1 ).SetValue( "Send Email" ) + .SetFormulaA1( "=HYPERLINK(\"mailto:test@test.com\", \"Send Email\")" ) + .Hyperlink = new XLHyperlink( "mailto:test@test.com", "'Send Email'" ); // List all hyperlinks in a worksheet: var hyperlinksInWorksheet = ws.Hyperlinks;