Skip to main content

Support conversion of HTML inline text formatting to Excel - Community / GemBox.Spreadsheet Feature Request - GemBox Support Center

It is very important for me to have inline text formatting in HTML to be translated to Excel. Sometimes I have the formatting specified in style attributes and sometimes I have <font> tags, or <b>, <u>, and <i>. The most important inline font stylings for me are size, underline, colour, bold and italic.

Comments (2)

C Jette
I would love for simple tags (<br>, <span>, <strong> etc) tags to be able to used when adding content to a cell. Is this possible? If so, how?

Thanks!
Mario - GemBox
Hi,

Yes, this is possible, this feature is in "Completed" stage.
Please try the following example:


ExcelFile ef = new ExcelFile&#40; &#41;;
ExcelWorksheet ws = ef.Worksheets.Add("Sheet1");
ExcelCell cell = ws.Cells["A1"];

cell.SetValue("<span ><strong>Foo</strong> <em>Bar</em></span>", LoadOptions.HtmlDefault);

ef.Save("Sample.xlsx");


I hope this helps.

Regards,

Mario
GemBox d.o.o.