Project

PSWriteOffice

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

Stars 654
Forks 82
Open issues 1
Total downloads 4,320,051
Release OfficeIMO-v3.5.3
Language: C# Updated: 2026-11-03
Cmdlet

Add-OfficeExcelConditionalDataBar

Aliases: ExcelConditionalDataBar
Module
PSWriteOffice
Aliases
ExcelConditionalDataBar
Inputs
OfficeIMO.Excel.ExcelDocument

Adds a data bar conditional format to a range.

Syntax

Add-OfficeExcelConditionalDataBar
[-Color] <String>
[-HeaderName <String>]
[-HeaderRow <Int32>]
[-IncludeHeader]
[-PassThru]
[-PivotTableName <String>]
[-PivotWholeTable]
[[-Range] <String>]
[-TableName <String>]
[<CommonParameters>]
#
Parameter set: Context
Add-OfficeExcelConditionalDataBar
[-Color] <String>
-Document <ExcelDocument>
[-HeaderName <String>]
[-HeaderRow <Int32>]
[-IncludeHeader]
[-PassThru]
[-PivotTableName <String>]
[-PivotWholeTable]
[[-Range] <String>]
[-Sheet <String>]
[-SheetIndex <Int32>]
[-TableName <String>]
[<CommonParameters>]
#
Parameter set: Document

Examples

Add blue data bars.

ExcelSheet 'Data' { Add-OfficeExcelConditionalDataBar -Range 'D2:D50' -Color '#4F81BD' }

Applies data bars to column D.

Parameters

-Color String requiredposition: 1
Bar color. Named colors and hexadecimal values are accepted.
-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.
-IncludeHeader SwitchParameter optional
Include the header cell in the resolved range.
-PassThru SwitchParameter optional
Emit the range after applying the format.
-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.
-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.