Click or drag to resize

IXLSRange RichText Property

String with rich text formatting. Read-only.
Examples
The following code illustrates how to set rich text formatting in the range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create style</para><para>IStyle style = workbook.Styles.Add("CustomStyle");</para><para>//Set rich text</para><para>IRichTextString richText = worksheet["C2"].RichText;</para><para>richText.Text = "Sample text";</para><para>//Set rich text font</para><para>IFont font = style.Font;</para><para>font.IsBold = true;</para><para>richText.SetFont(0, 5, font);</para><para>//Save to file</para><para>workbook.SaveToFile("RichText.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
IRichTextString RichText { get; }

Property Value

Type: IRichTextString
See Also