Update and rename ConditionalFormattingUnmatchColumns.ps1 to ConditionalFormattingUnmatchColumns-Sol1.ps1

Minor update and change the filename as Solution 1
This commit is contained in:
Wyatt Wong
2024-02-06 10:04:44 +08:00
committed by GitHub
parent 1b2c280e4b
commit d251e7070a

View File

@@ -19,8 +19,8 @@ Remove-Item $xlfile -ErrorAction SilentlyContinue
$file = $data | Export-Excel $xlfile -AutoSize -PassThru
$cfi1 = Add-ConditionalFormatting -Worksheet $file.sheet1 -Range '$D$2:$D$1048576' -ConditionValue '=NOT(EXACT($A2,$D2))' -RuleType Expression -ForegroundColor Red
$cfi2 = Add-ConditionalFormatting -Worksheet $file.sheet1 -Range '$E$2:$E$1048576' -ConditionValue '=NOT(EXACT($B2,$E2))' -RuleType Expression -ForegroundColor Red
$cfi3 = Add-ConditionalFormatting -Worksheet $file.sheet1 -Range '$F$2:$F$1048576' -ConditionValue '=NOT(EXACT($C2,$F2))' -RuleType Expression -ForegroundColor Red
Add-ConditionalFormatting -Worksheet $file.sheet1 -Range '$D$2:$D$1048576' -ConditionValue '=NOT(EXACT($A2,$D2))' -RuleType Expression -ForegroundColor Red
Add-ConditionalFormatting -Worksheet $file.sheet1 -Range '$E$2:$E$1048576' -ConditionValue '=NOT(EXACT($B2,$E2))' -RuleType Expression -ForegroundColor Red
Add-ConditionalFormatting -Worksheet $file.sheet1 -Range '$F$2:$F$1048576' -ConditionValue '=NOT(EXACT($C2,$F2))' -RuleType Expression -ForegroundColor Red
Close-ExcelPackage $file -Show