如何使用EPPlus在单元格内创建链接
问题描述:
我试图找出如何使用EPPlus而不是包含链接文本的单元格在单元格中写入超链接。我需要它被认为是一个链接并可点击。
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.
任何帮助都不胜感激。
答
以下代码对我很好。
string FileRootPath = "http://www.google.com";
_Worksheet.Cells[intCellNumber, 1].Formula = "HYPERLINK(\"" + FileRootPath + "\",\"" + DisplayText + "\")";
我希望这将有助于您。
快乐编码!!