Skip to content

Latest commit

 

History

History
162 lines (126 loc) · 3.14 KB

File metadata and controls

162 lines (126 loc) · 3.14 KB
external help file PSWriteOffice-help.xml
Module Name PSWriteOffice
online version https://github.com/EvotecIT/PSWriteOffice
schema 2.0.0

Add-OfficeExcelConditionalColorScale

SYNOPSIS

Adds a two-color scale conditional format to a range.

SYNTAX

Context (Default)

Add-OfficeExcelConditionalColorScale [-Range] <string> [-StartColor] <string> [-EndColor] <string> [-PassThru] [<CommonParameters>]

Document

Add-OfficeExcelConditionalColorScale [-Range] <string> [-StartColor] <string> [-EndColor] <string> -Document <ExcelDocument> [-Sheet <string>] [-SheetIndex <int>] [-PassThru] [<CommonParameters>]

DESCRIPTION

Adds a two-color scale conditional format to a range.

EXAMPLES

EXAMPLE 1

PS>ExcelSheet 'Data' { Add-OfficeExcelConditionalColorScale -Range 'B2:B50' -StartColor '#FF0000' -EndColor '#00FF00' }

Applies a red-to-green scale to column B.

PARAMETERS

-Document

Workbook to operate on outside the DSL context.

Type: ExcelDocument
Parameter Sets: Document
Aliases: None
Possible values: 

Required: True
Position: named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: True

-EndColor

End color in hex (#RRGGBB or FFRRGGBB).

Type: String
Parameter Sets: Context, Document
Aliases: None
Possible values: 

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-PassThru

Emit the range after applying the format.

Type: SwitchParameter
Parameter Sets: Context, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Range

A1 range to format.

Type: String
Parameter Sets: Context, Document
Aliases: None
Possible values: 

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Sheet

Worksheet name when using Document.

Type: String
Parameter Sets: Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-SheetIndex

Worksheet index (0-based) when using Document.

Type: Nullable`1
Parameter Sets: Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-StartColor

Start color in hex (#RRGGBB or FFRRGGBB).

Type: String
Parameter Sets: Context, Document
Aliases: None
Possible values: 

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • OfficeIMO.Excel.ExcelDocument

OUTPUTS

  • System.Object

RELATED LINKS

  • None