Add 'Equal' for conditional text type

This commit is contained in:
dfinke
2016-02-17 19:44:14 -05:00
parent 06c1f2a560
commit 60151de80a
2 changed files with 6 additions and 2 deletions

View File

@@ -347,7 +347,11 @@ function Export-Excel {
$rule=($ws.Cells[$Range].ConditionalFormatting).$target() $rule=($ws.Cells[$Range].ConditionalFormatting).$target()
if($targetConditionalText.Text) { if($targetConditionalText.Text) {
$rule.Text = $targetConditionalText.Text if($targetConditionalText.ConditionalType -eq "equal") {
$rule.Formula= $targetConditionalText.Text
} else {
$rule.Text = $targetConditionalText.Text
}
} }
$rule.Style.Font.Color.Color = $targetConditionalText.ConditionalTextColor $rule.Style.Font.Color.Color = $targetConditionalText.ConditionalTextColor

View File

@@ -7,7 +7,7 @@ function New-ConditionalText {
[String]$Range, [String]$Range,
[OfficeOpenXml.Style.ExcelFillStyle]$PatternType=[OfficeOpenXml.Style.ExcelFillStyle]::Solid, [OfficeOpenXml.Style.ExcelFillStyle]$PatternType=[OfficeOpenXml.Style.ExcelFillStyle]::Solid,
[ValidateSet( [ValidateSet(
"ContainsText","NotContainsText","BeginsWith","EndsWith", "Equal","ContainsText","NotContainsText","BeginsWith","EndsWith",
"Last7Days","LastMonth","LastWeek", "Last7Days","LastMonth","LastWeek",
"NextMonth","NextWeek", "NextMonth","NextWeek",
"ThisMonth","ThisWeek", "ThisMonth","ThisWeek",