# ExcelRichTextRun

Describes a run of rich text inside a cell.

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[ExcelRichTextRun.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L20)

**Modifiers**

sealed

Describes a run of rich text inside a cell.

## Inheritance

- object
- ExcelRichTextRun

## Usage

Explore 9 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 6

- Method [ExcelCell.GetRichText](/api/excel/officeimo-excel-excelcell/#method-getrichtext)
- Property [ExcelCellInfo.RichTextRuns](/api/excel/officeimo-excel-excelcellinfo/#property-richtextruns)
- Property [ExcelCommentInfo.RichTextRuns](/api/excel/officeimo-excel-excelcommentinfo/#property-richtextruns)
- Property [ExcelCommentInspectionInfo.RichTextRuns](/api/excel/officeimo-excel-excelcommentinspectioninfo/#property-richtextruns)
- Method [ExcelRichTextRun.Plain](/api/excel/officeimo-excel-excelrichtextrun/#method-plain-string)
- Method [ExcelRichTextRun.TransformTextCase](/api/excel/officeimo-excel-excelrichtextrun/#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)

### Accepted by parameters 3

- Method [ExcelCell.SetRichText](/api/excel/officeimo-excel-excelcell/#method-setrichtext-officeimo-excel-excelrichtextrun) parameter `runs`
- Method [ExcelSheet.SetCommentRichText](/api/excel/officeimo-excel-excelsheet/#method-setcommentrichtext-int32-int32-collections-generic-ienumerable-officeimo-excel-excelrichtextrun-string-string) parameter `runs`
- Method [ExcelSheet.UpdateCommentsRichText](/api/excel/officeimo-excel-excelsheet/#method-updatecommentsrichtext-officeimo-excel-excelcommentfilter-collections-generic-ienumerable-officeimo-excel-excelrichtextrun-string-string) parameter `runs`

Filter members 

Show inherited

## Constructors

`public ExcelRichTextRun(string text)` [#](#constructor-ctor-string)

[ExcelRichTextRun.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L20)

Creates a rich text run with the supplied text.

Parameters

**text string required**

## Methods

`public static ExcelRichTextRun Plain(string text)` [#](#method-plain-string)

[ExcelRichTextRun.cs:110](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L110)

Creates a plain rich text run.

Parameters

**text string required**

Returns

`ExcelRichTextRun`

`public ExcelRichTextRun TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null)` [#](#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)

[ExcelRichTextRun.cs:116](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L116)

Changes the stored run text casing while preserving rich-text formatting.

Parameters

**textCase OfficeIMO.Drawing.OfficeTextCase required**

**culture System.Globalization.CultureInfo? = null optional**

Returns

`ExcelRichTextRun`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Text { get; set; }` [#](#property-text)

[ExcelRichTextRun.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L25)

Gets or sets the run text.

`public bool Bold { get; set; }` [#](#property-bold)

[ExcelRichTextRun.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L28)

Gets or sets whether the run is bold.

`public bool Italic { get; set; }` [#](#property-italic)

[ExcelRichTextRun.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L36)

Gets or sets whether the run is italic.

`public bool Underline { get; set; }` [#](#property-underline)

[ExcelRichTextRun.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L44)

Gets or sets whether the run is underlined.

`public bool Strikethrough { get; set; }` [#](#property-strikethrough)

[ExcelRichTextRun.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L57)

Gets or sets whether the run is struck through.

`public ExcelUnderlineStyle? UnderlineStyle { get; set; }` [#](#property-underlinestyle)

[ExcelRichTextRun.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L65)

Gets or sets the run underline style.

`public OfficeColor? Color { get; set; }` [#](#property-color)

[ExcelRichTextRun.cs:75](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L75)

Gets or sets the literal or theme-based run text color.

`public string? FontFamily { get; set; }` [#](#property-fontfamily)

[ExcelRichTextRun.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L77)

Gets or sets the run typeface family name.

`public OfficeLength? FontSize { get; set; }` [#](#property-fontsize)

[ExcelRichTextRun.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L80)

Gets or sets the positive physical run font size; null inherits the cell font size.

`public ExcelVerticalTextAlignment? VerticalTextAlignment { get; set; }` [#](#property-verticaltextalignment)

[ExcelRichTextRun.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L88)

Gets or sets the run vertical text alignment.

`public bool Outline { get; set; }` [#](#property-outline)

[ExcelRichTextRun.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L90)

Gets or sets whether the run font uses outline text.

`public bool Shadow { get; set; }` [#](#property-shadow)

[ExcelRichTextRun.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L92)

Gets or sets whether the run font uses shadow text.

`public bool Condense { get; set; }` [#](#property-condense)

[ExcelRichTextRun.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L94)

Gets or sets whether the run font uses condensed text.

`public bool Extend { get; set; }` [#](#property-extend)

[ExcelRichTextRun.cs:96](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L96)

Gets or sets whether the run font uses extended text.

`public byte? FontFamilyClassification { get; set; }` [#](#property-fontfamilyclassification)

[ExcelRichTextRun.cs:98](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L98)

Gets or sets the run font family classification byte.

`public byte? FontCharacterSet { get; set; }` [#](#property-fontcharacterset)

[ExcelRichTextRun.cs:100](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Excel/ExcelRichTextRun.cs#L100)

Gets or sets the run font character set byte.

<!-- PowerForge markdown artifact sha256:FBC39B88E55E6120FEFB16E39F4CE9EE202E08FB52486BB5DCCCA71EB8FC29AC -->
