Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Get-OfficeExcelRichText

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

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

Syntax

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

Examples

Inspect rich text runs from a workbook.

$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.

Parameters

-Address String optional
A1-style cell address.
-Column Int32 optional
1-based column index.
-Row Int32 optional
1-based row index.
-Sheet String optionalaliases: WorksheetName
Worksheet name. Defaults to the current sheet inside an ExcelSheet block.
-SheetIndex Int32 optional
Worksheet index when using a workbook object or path.
-Path String requiredposition: 0aliases: FilePath, InputPathsets: Path
Workbook path to inspect.
-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document
Workbook to inspect outside the DSL context.

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.