[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IRichText

IRichText Interface

Represents rich text content in a cell.

An IRichText object contains a collection of ITextRun objects that together define the text and character-level formatting for a cell. You can obtain this interface from RichText and use it to append formatted text runs or iterate through existing text runs.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IRichText : IEnumerable<ITextRun>, IEnumerable
Public Interface IRichText
    Inherits IEnumerable(Of ITextRun), IEnumerable
Examples
IRichText richText = worksheet.Range["A1"].RichText;
ITextRun run1 = richText.Add("Document ");
run1.Font.Bold = true;
ITextRun run2 = richText.Add("Solutions");
run2.Font.Color = Color.Blue;

Properties

Name Description
Count

Returns the count of ITextRun objects.

PlainText

Returns the plain text that is composed of all ITextRun objects.

Returns the concatenated text content of the rich text without exposing individual text run formatting.

Methods

Name Description
Add(string)

Adds a text run into the current rich text object.

The new text run is appended to this IRichText and can be used to apply character-level formatting to the added text.