From d7348250fc201e55c546bbffacc9a039e0a8a1bf Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Mon, 20 Jun 2022 13:00:33 -0400 Subject: [PATCH] Updated --- Examples/ConditionalFormatting/Highlight-DiffCells.ps1 | 5 ++--- changelog.md | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Examples/ConditionalFormatting/Highlight-DiffCells.ps1 b/Examples/ConditionalFormatting/Highlight-DiffCells.ps1 index a4852c3..4cbffac 100644 --- a/Examples/ConditionalFormatting/Highlight-DiffCells.ps1 +++ b/Examples/ConditionalFormatting/Highlight-DiffCells.ps1 @@ -1,7 +1,7 @@ try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return } -#Get rid of pre-exisiting sheet -$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx" +# Get rid of pre-exisiting sheet +$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx" Write-Verbose -Verbose -Message "Save location: $xlSourcefile" Remove-Item $xlSourcefile -ErrorAction Ignore @@ -19,7 +19,6 @@ North,North Dakota,789,640 South,Delaware,712,508 "@ - $excel = $data | Export-Excel $xlSourcefile -AutoSize -PassThru Add-ConditionalFormatting -Worksheet $excel.sheet1 -Range "C2:C10" -ConditionValue '=C2=D2' -RuleType Expression -BackgroundColor Cyan diff --git a/changelog.md b/changelog.md index 4260b7f..5d85a1b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +# Example added + +Thank you [@kkazala](https://github.com/kkazala) +- Added an example showing `ConditionalFormatting` using the `RuleType` `Expression` with a formula + - [Highlight-DiffCells.ps1](https://github.dev/kkazala/ImportExcel/blob/b53881fd023c052da1acc7812511da223bb2e40c/Examples/ConditionalFormatting/Highlight-DiffCells.ps1) + # 7.6.0 - **_[Under investigation]_** Fix -StartRow and -StartColumn being ignored.