Cmdlet
Add-OfficeExcelConditionalColorScale
Adds a two-color scale conditional format to a range.
Syntax
Add-OfficeExcelConditionalColorScale
[-EndColor] <String>
[-HeaderName <String>]
[-HeaderRow <Int32>]
[-IncludeHeader]
[-PassThru]
[-PivotTableName <String>]
[-PivotWholeTable]
[[-Range] <String>]
[-StartColor] <String>
[-TableName <String>]
[<CommonParameters>]#Parameter set:
ContextAdd-OfficeExcelConditionalColorScale
-Document <ExcelDocument>
[-EndColor] <String>
[-HeaderName <String>]
[-HeaderRow <Int32>]
[-IncludeHeader]
[-PassThru]
[-PivotTableName <String>]
[-PivotWholeTable]
[[-Range] <String>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-StartColor] <String>
[-TableName <String>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Apply a red-to-green color scale.
ExcelSheet 'Data' { Add-OfficeExcelConditionalColorScale -Range 'B2:B50' -StartColor '#FF0000' -EndColor '#00FF00' }Applies a red-to-green scale to column B.
Parameters
- -EndColor String
- End color. Named colors and hexadecimal values are accepted.
- -HeaderName String
- Header or table column name used to resolve the target range.
- -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.
- -PassThru SwitchParameter
- Emit the range after applying the format.
- -PivotTableName String
- Pivot table name used to resolve the target range.
- -PivotWholeTable SwitchParameter
- Use the full pivot output range instead of the default data body range.
- -Range String
- A1 range to format.
- -StartColor String
- Start color. Named colors and hexadecimal values are accepted.
- -TableName String
- Optional table name for header-based range resolution.
- -Document ExcelDocument
- Workbook to operate on outside the DSL context.
- -Sheet String
- Worksheet name when using Document.
- -SheetIndex Int32
- Worksheet index (0-based) when using Document.
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.