API Reference
Command
Add-OfficeExcelConditionalColorScale
Adds a two-color scale conditional format to a range.
Remarks
Adds a two-color scale conditional format to a range.
Examples
Apply a red-to-green color scale.
PS>ExcelSheet 'Data' { Add-OfficeExcelConditionalColorScale -Range 'B2:B50' -StartColor '#FF0000' -EndColor '#00FF00' }
Applies a red-to-green scale to column B.
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
Add-OfficeExcelConditionalColorScale -EndColor <String> [-PassThru] -Range <String> -StartColor <String> [<CommonParameters>]#Parameter set:
ContextParameters
- EndColor String
- End color in hex (#RRGGBB or FFRRGGBB).
- PassThru SwitchParameter
- Emit the range after applying the format.
- Range String
- A1 range to format.
- StartColor String
- Start color in hex (#RRGGBB or FFRRGGBB).
Outputs
System.Object
Add-OfficeExcelConditionalColorScale -Document <ExcelDocument> -EndColor <String> [-PassThru] -Range <String> [-Sheet <String>] [-SheetIndex <Nullable`1>] -StartColor <String> [<CommonParameters>]#Parameter set:
DocumentParameters
- Document ExcelDocument
- Workbook to operate on outside the DSL context.
- EndColor String
- End color in hex (#RRGGBB or FFRRGGBB).
- PassThru SwitchParameter
- Emit the range after applying the format.
- Range String
- A1 range to format.
- Sheet String
- Worksheet name when using Document.
- SheetIndex Nullable`1
- Worksheet index (0-based) when using Document.
- StartColor String
- Start color in hex (#RRGGBB or FFRRGGBB).
Outputs
System.Object