# Get-OfficeExcelRichText

Gets the rich-text runs of a cell. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Excel.ExcelDocument` `System.String[]`

**Source**

[GetOfficeExcelRichTextCommand.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Excel/GetOfficeExcelRichTextCommand.cs#L27) 

Gets the rich-text runs of a cell.

## Syntax

```
Get-OfficeExcelRichText
-Address <String>
[-Document <ExcelDocument>]
[-Sheet <OfficeSheetSelector>]
[<CommonParameters>]
```

[#](#method-get-officeexcelrichtext-string-exceldocument-officesheetselector)

Parameter set: `Document`

```
Get-OfficeExcelRichText
-Address <String>
[-Path] <String[]>
[-Sheet <OfficeSheetSelector>]
[<CommonParameters>]
```

[#](#method-get-officeexcelrichtext-string-string-officesheetselector)

Parameter set: `Path`

```
Get-OfficeExcelRichText
-Address <String>
-LiteralPath <String[]>
[-Sheet <OfficeSheetSelector>]
[<CommonParameters>]
```

[#](#method-get-officeexcelrichtext-string-string-officesheetselector-2)

Parameter set: `LiteralPath`

## Examples

### Read the text runs of a cell

```powershell
Get-OfficeExcelRichText -Path .\Reports\Migration.xlsx -Sheet Overview -Address B3
```

Returns each formatted run of B3 on the Overview sheet.

### Find the bold parts of a status cell

```powershell
$book = Open-OfficeExcel -Path .\Reports\Status.xlsx -ReadOnly
Get-OfficeExcelRichText -Document $book -Sheet Summary -Address B2 | Where-Object Bold
Close-OfficeExcel -Document $book
```

Reads the runs of a status cell from an open workbook and keeps only the bold text.

## Parameters

**-Address String required**

A1 address of the target cell.

**-Document ExcelDocument optionalpipeline: True (ByValue)sets: Document**

Caller-owned workbook; omission uses the enclosing Excel content block.

**-Sheet OfficeSheetSelector optionalaliases: WorksheetName**

Worksheet name, one-based position or native worksheet object. Multi-sheet commands also accept wildcard names.

**-Path String[] requiredposition: 0pipeline: True (ByValue)aliases: FilePathsets: Path**

Workbook paths resolved with filesystem wildcard support.

**-LiteralPath String[] requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath**

Literal workbook paths, including FileInfo.FullName and provider PSPath.

## Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see [about_CommonParameters](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

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