All docs
V19.2
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

CellRange.GetRichText() Method

Gets the rich text string contained in a cell.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

RichTextString GetRichText()
Function GetRichText As RichTextString
RichTextString GetRichText()
Function GetRichText As RichTextString
RichTextString GetRichText()
Function GetRichText As RichTextString

Returns

Type Description
RichTextString

A RichTextString object that is a cell's rich text.

Returns

Type Description
RichTextString

A RichTextString object that is a cell's rich text.

Returns

Type Description
RichTextString

A RichTextString object that is a cell's rich text.

Remarks

Use the CellRange.HasRichText property to check whether a cell contains rich formatted text. To retrieve rich text from a cell, use the GetRichText property. For the cell text with regular cell formatting applied, the GetRichText method returns RichTextString with a single run containing only the cell text. The run's RichTextRun.Font is null. If a cell contains a non-textual value (e.g., number or date), the returned RichTextString contains an empty text.

If you call the GetRichText method for a cell range, it returns a non-empty rich text only when all cells in this range have the same text with identical rich format settings; otherwise, GetRichText returns an empty text with an empty RichTextString.Runs collection.

See Also