diff --git a/TryConditional.ps1 b/TryConditional.ps1 new file mode 100644 index 0000000..8176767 --- /dev/null +++ b/TryConditional.ps1 @@ -0,0 +1,18 @@ +$xlFile = "c:\temp\testCF.xlsx" +rm $xlFile + +$data = Get-Process | where Company | select Company,pm,handles,name + +$cfHandles = New-ConditionalFormattingIconSet ` + -Address "C:C" ` + -ConditionalFormat ThreeIconSet ` + -IconType Flags -Reverse + +$cfPM = New-ConditionalFormattingIconSet ` + -Address "B:B" ` + -ConditionalFormat FourIconSet ` + -Reverse -IconType TrafficLights + + +$data | + Export-Excel -AutoSize -AutoFilter -ConditionalFormat $cfHandles, $cfPM -Path $xlFile -Show \ No newline at end of file