forked from dfinke/ImportExcel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetProcess.ps1
More file actions
19 lines (14 loc) · 969 Bytes
/
Copy pathGetProcess.ps1
File metadata and controls
19 lines (14 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
Remove-Item "$env:TEMP\testExport.xlsx" -ErrorAction Ignore
Get-Process | Where-Object Company | Select-Object Company, Name, PM, Handles, *mem* |
#This example creates a 3 Icon set for the values in the "PM column, and Highlights company names (anywhere in the data) with different colors
Export-Excel "$env:TEMP\testExport.xlsx" -Show -AutoSize -AutoNameRange `
-ConditionalFormat $(
New-ConditionalFormattingIconSet -Range "C:C" `
-ConditionalFormat ThreeIconSet -IconType Arrows
) -ConditionalText $(
New-ConditionalText Microsoft -ConditionalTextColor Black
New-ConditionalText Google -BackgroundColor Cyan -ConditionalTextColor Black
New-ConditionalText authors -BackgroundColor LightBlue -ConditionalTextColor Black
New-ConditionalText nvidia -BackgroundColor LightGreen -ConditionalTextColor Black
)