API Reference
Cmdlet
Get-OfficeExcelConditionalFormatting
Gets conditional formatting rules from one or more Excel worksheets.
Remarks
Gets conditional formatting rules from one or more Excel worksheets.
Examples
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:
ContextParameters
- HeaderName String
- Header or table column name used to resolve the range filter.
- HeaderRow Int32
- Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
- IncludeHeader SwitchParameter
- Include the header cell in the resolved range.
- Range String
- Optional A1 range filter.
- Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- SheetIndex Nullable`1
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- TableName String
- 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:
PathParameters
- HeaderName String
- Header or table column name used to resolve the range filter.
- HeaderRow Int32
- Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
- IncludeHeader SwitchParameter
- Include the header cell in the resolved range.
- InputPath String
- Workbook path to inspect.
- Range String
- Optional A1 range filter.
- Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- SheetIndex Nullable`1
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- TableName String
- 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:
DocumentParameters
- Document ExcelDocument
- Workbook to inspect outside the DSL context.
- HeaderName String
- Header or table column name used to resolve the range filter.
- HeaderRow Int32
- Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.
- IncludeHeader SwitchParameter
- Include the header cell in the resolved range.
- Range String
- Optional A1 range filter.
- Sheet String
- Worksheet name to inspect. Defaults to the current DSL sheet or all workbook sheets.
- SheetIndex Nullable`1
- Worksheet index (0-based) to inspect. Defaults to the current DSL sheet or all workbook sheets.
- TableName String
- Optional table name for header-based range resolution.
Outputs
System.Management.Automation.PSObject