TRichString.FromHtml Method
Returns a new TRichString from an HTML text. Note that only some tags from HTML are converted, the ones that do not have correspondence on Excel rich text will be discarded.Note: This method is for advanced uses only. Normally you would just use TExcelFile.SetCellFromHtml(Integer, Integer, string, Integer)
Syntax
Unit: FlexCel.Core
class function TRichString.FromHtml(const HtmlString: string; const aCellFormat: TFlxFormat; const aWorkbook: TCoreExcelFile): TRichString; static;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | HtmlString | string | Html string we want to convert. |
const | aCellFormat | TFlxFormat | Original format of the cell where we want to enter the string. Note that depending on the starting cell, the Rich string will be different. For example, if you have a cell with Red text and add a "hello <b> world" string, then resulting RichString will include a RED bold "world" string |
const | aWorkbook | TCoreExcelFile | File where this string will be added. |
Returns
A TRichString containing the converted Html.