Examples/ConditionalFormatting/HighlightDuplicates.ps1
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return} $f = ".\testExport.xlsx" Remove-Item $f -ErrorAction Ignore $data = $( New-PSItem North 111 @('Region', 'Amount' ) New-PSItem East 11 New-PSItem West 12 New-PSItem South 1000 New-PSItem NorthEast 10 New-PSItem SouthEast 14 New-PSItem SouthWest 13 New-PSItem South 12 New-PSItem NorthByNory 100 New-PSItem NothEast 110 New-PSItem Westerly 120 New-PSItem SouthWest 11 ) $data | Export-Excel $f -Show -AutoSize -ConditionalText (New-ConditionalText -ConditionalType DuplicateValues) |