This project has moved. For the latest updates, please go here.

HTML in cell

Dec 1, 2010 at 3:57 AM

Hello Jan , I need your help

I want to display html in excel like that

sheet..Cell["A1"].value="<font color="blue"><strong>test html in excel</strong></font>" and it will display like test html in excel


Dec 1, 2010 at 7:02 AM

There is no support for parsing HTML, so you will have to do that yourself, but if you want to format a cell text in more that one style, use the RichText property...

var rs = ws.Cells["A1"].RichText;
var r1 = rs.Add("Blue ");
r1.Color = Color.Blue;

var r2 = rs.Add("Red");
r2.Color = Color.Red;