# Add-OfficeExcelConditionalIconSet

Adds an icon set conditional format to a range. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **725**

Forks **84**

Open issues **4**

Total downloads **5,250,223**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: ExcelConditionalIconSet

**Module**

`PSWriteOffice`

**Aliases**

`ExcelConditionalIconSet`

**Inputs**

`OfficeIMO.Excel.ExcelDocument`

**Source**

[AddOfficeExcelConditionalIconSetCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Excel/AddOfficeExcelConditionalIconSetCommand.cs#L18) 

Adds an icon set conditional format to a range.

## Syntax

```
Add-OfficeExcelConditionalIconSet
[-HeaderName <String>]
[-HeaderRow <Int32>]
[-IconSet <ExcelIconSet>]
[-IncludeHeader]
[-NumberThresholds <Double[]>]
[-PassThru]
[-PercentThresholds <Double[]>]
[-PivotTableName <String>]
[-PivotWholeTable]
[[-Range] <String>]
[-Reverse <Boolean>]
[-ShowValue <Boolean>]
[-TableName <String>]
[<CommonParameters>]
```

[#](#method-add-officeexcelconditionaliconset-string-int32-exceliconset-switchparameter-double-switchparameter-double-string-switchparameter-string-boolean-boolean-string)

Parameter set: `Context`

```
Add-OfficeExcelConditionalIconSet
-Document <ExcelDocument>
[-HeaderName <String>]
[-HeaderRow <Int32>]
[-IconSet <ExcelIconSet>]
[-IncludeHeader]
[-NumberThresholds <Double[]>]
[-PassThru]
[-PercentThresholds <Double[]>]
[-PivotTableName <String>]
[-PivotWholeTable]
[[-Range] <String>]
[-Reverse <Boolean>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-ShowValue <Boolean>]
[-TableName <String>]
[<CommonParameters>]
```

[#](#method-add-officeexcelconditionaliconset-exceldocument-string-int32-exceliconset-switchparameter-double-switchparameter-double-string-switchparameter-string-boolean-string-int32-boolean-string)

Parameter set: `Document`

## Examples

### Add traffic light icons.

```powershell
ExcelSheet 'Data' { Add-OfficeExcelConditionalIconSet -Range 'E2:E50' -IconSet ThreeTrafficLights1 }
```

Applies a traffic-light icon set.

## Parameters

**-HeaderName String optionalaliases: ColumnName**

Header or table column name used to resolve the target range.

**-HeaderRow Int32 optional**

Worksheet header row used when resolving HeaderName without a table. Use 0 for the first row of the used range.

**-IconSet ExcelIconSet optional**

Icon set to apply.

Possible values: `ThreeArrows`, `ThreeArrowsGray`, `ThreeFlags`, `ThreeTrafficLights1`, `ThreeTrafficLights2`, `ThreeSigns`, `ThreeSymbols`, `ThreeSymbols2`, `FourArrows`, `FourArrowsGray`, `FourRedToBlack`, `FourRating`, `FourTrafficLights`, `FiveArrows`, `FiveArrowsGray`, `FiveRating`, `FiveQuarters`

**-IncludeHeader SwitchParameter optional**

Include the header cell in the resolved range.

**-NumberThresholds Double[] optional**

Number thresholds matching the icon count.

**-PassThru SwitchParameter optional**

Emit the range after applying the format.

**-PercentThresholds Double[] optional**

Percent thresholds (0..100) matching the icon count.

**-PivotTableName String optional**

Pivot table name used to resolve the target range.

**-PivotWholeTable SwitchParameter optional**

Use the full pivot output range instead of the default data body range.

**-Range String optionalposition: 0**

A1 range to format.

**-Reverse Boolean optional**

Reverse the icon order.

**-ShowValue Boolean optional**

Show the underlying values.

**-TableName String optional**

Optional table name for header-based range resolution.

**-Document ExcelDocument requiredpipeline: True (ByValue)sets: Document**

Workbook to operate on outside the DSL context.

**-Sheet String optionalsets: Document**

Worksheet name when using Document.

**-SheetIndex Int32 optionalsets: Document**

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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:1F373CB7F609A7F64C0E1A78B373751FF55D91474DC8A1DFF3D4CA2BD72F31E7 -->
