Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Get-OfficeExcelRichText

Aliases: ExcelRichTextRuns
Namespace PSWriteOffice
Aliases
ExcelRichTextRuns
Inputs
OfficeIMO.Excel.ExcelDocument
Outputs
System.Management.Automation.PSObject

Gets mixed-format rich text runs from an Excel cell.

Remarks

Gets mixed-format rich text runs from an Excel cell.

Examples

Authored help example

Inspect rich text runs from a workbook.

PS>


$runs = Get-OfficeExcelRichText -Path .\Report.xlsx -Sheet Summary -Address A1
            $runs |
                Format-Table Index, Text, Bold, Italic, Color
        

Returns one object per inline rich text run with text and style properties.

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.

Syntax

Get-OfficeExcelRichText [-Address <String>] [-Column <Int32>] [-Row <Int32>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]
#
Parameter set: Context

Parameters

Address String optionalposition: namedpipeline: False
A1-style cell address.
Column Int32 optionalposition: namedpipeline: False
1-based column index.
Row Int32 optionalposition: namedpipeline: False
1-based row index.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
SheetIndex Int32 optionalposition: namedpipeline: False
Worksheet index when using a workbook object or path.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelRichText [-Address <String>] [-Column <Int32>] -Path <String> [-Row <Int32>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]
#
Parameter set: Path

Parameters

Address String optionalposition: namedpipeline: False
A1-style cell address.
Column Int32 optionalposition: namedpipeline: False
1-based column index.
Path String requiredposition: 0pipeline: Falsealiases: FilePath, InputPath
Workbook path to inspect.
Row Int32 optionalposition: namedpipeline: False
1-based row index.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
SheetIndex Int32 optionalposition: namedpipeline: False
Worksheet index when using a workbook object or path.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelRichText [-Address <String>] [-Column <Int32>] -Document <ExcelDocument> [-Row <Int32>] [-Sheet <String>] [-SheetIndex <Int32>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Address String optionalposition: namedpipeline: False
A1-style cell address.
Column Int32 optionalposition: namedpipeline: False
1-based column index.
Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect outside the DSL context.
Row Int32 optionalposition: namedpipeline: False
1-based row index.
Sheet String optionalposition: namedpipeline: Falsealiases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
SheetIndex Int32 optionalposition: namedpipeline: False
Worksheet index when using a workbook object or path.

Outputs

System.Management.Automation.PSObject