API Reference

Cmdlet

Get-OfficeExcelConditionalFormatting

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

Gets conditional formatting rules from one or more Excel worksheets.

Remarks

Gets conditional formatting rules from one or more Excel worksheets.

Examples

Authored help example

List conditional formatting rules from a workbook.

PS>


Get-OfficeExcelConditionalFormatting -Path .\Report.xlsx -Sheet Data |
                Select-Object -Property SheetName, Range, Type, Operator, Formulas
        

Returns rule metadata that can be filtered, exported, or used before clearing stale rules.

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-OfficeExcelConditionalFormatting [-HeaderName <String>] [-HeaderRow <Int32>] [-IncludeHeader] [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TableName <String>] [<CommonParameters>]
#
Parameter set: Context

Parameters

HeaderName String optionalposition: namedpipeline: Falsealiases: ColumnName
Header or table column name used to resolve the range filter.
HeaderRow Int32 optionalposition: namedpipeline: False
Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
IncludeHeader SwitchParameter optionalposition: namedpipeline: False
Include the header cell in the resolved range.
Range String optionalposition: namedpipeline: False
Optional A1 range filter.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
TableName String optionalposition: namedpipeline: False
Optional table name for header-based range resolution.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelConditionalFormatting [-HeaderName <String>] [-HeaderRow <Int32>] [-IncludeHeader] -InputPath <String> [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TableName <String>] [<CommonParameters>]
#
Parameter set: Path

Parameters

HeaderName String optionalposition: namedpipeline: Falsealiases: ColumnName
Header or table column name used to resolve the range filter.
HeaderRow Int32 optionalposition: namedpipeline: False
Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
IncludeHeader SwitchParameter optionalposition: namedpipeline: False
Include the header cell in the resolved range.
InputPath String requiredposition: 0pipeline: Falsealiases: FilePath, Path
Workbook path to inspect.
Range String optionalposition: namedpipeline: False
Optional A1 range filter.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
TableName String optionalposition: namedpipeline: False
Optional table name for header-based range resolution.

Outputs

System.Management.Automation.PSObject

Get-OfficeExcelConditionalFormatting -Document <ExcelDocument> [-HeaderName <String>] [-HeaderRow <Int32>] [-IncludeHeader] [-Range <String>] [-Sheet <String>] [-SheetIndex <Nullable`1>] [-TableName <String>] [<CommonParameters>]
#
Parameter set: Document

Parameters

Document ExcelDocument requiredposition: namedpipeline: True (ByValue)
Workbook to inspect outside the DSL context.
HeaderName String optionalposition: namedpipeline: Falsealiases: ColumnName
Header or table column name used to resolve the range filter.
HeaderRow Int32 optionalposition: namedpipeline: False
Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
IncludeHeader SwitchParameter optionalposition: namedpipeline: False
Include the header cell in the resolved range.
Range String optionalposition: namedpipeline: False
Optional A1 range filter.
Sheet String optionalposition: namedpipeline: False
Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
SheetIndex Nullable`1 optionalposition: namedpipeline: False
Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
TableName String optionalposition: namedpipeline: False
Optional table name for header-based range resolution.

Outputs

System.Management.Automation.PSObject