Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a link inside a cell using EPPlus

Tags:

c#

excel

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.

Any help is appreciated.

like image 609
IEnumerator Avatar asked Oct 03 '11 18:10

IEnumerator


People also ask

How do you link within a cell?

On a worksheet, select the cell where you want to create a link. On the Insert tab, select Hyperlink. You can also right-click the cell and then select Hyperlink... on the shortcut menu, or you can press Ctrl+K. Under Display Text:, type the text that you want to use to represent the link.

What is EPPlus C#?

EPPlus is a very helpful open-source 3rd party DLL for writing data to excel. EPPlus supports multiple properties of spreadsheets like cell ranges, cell styling, charts, pictures, shapes, comments, tables, protection, encryption, pivot tables, data validation, conditional formatting, formula calculation, etc.

What is EPPlus library?

What is EPPlus? A library to manage Excel spreadsheets. EPPlus is a . NET library, which reads and writes Excel 2007/2010 or higher files, using Open Office XML format. It supports .


1 Answers

This is the other way to do:

var cell = sheet.Cells["A1"]; cell.Hyperlink = new Uri("http://www.google.com"); cell.Value = "Click me!"; 

I have tested. It works fine.

like image 131
Han Avatar answered Sep 20 '22 16:09

Han