forked from dfinke/ImportExcel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormatCalculations.ps1
More file actions
30 lines (22 loc) · 1.05 KB
/
Copy pathFormatCalculations.ps1
File metadata and controls
30 lines (22 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
$f = "$env:TEMP\testExport.xlsx"
Remove-Item $f -ErrorAction Ignore
$data = $(
New-PSItem North 111 (echo Region Amount )
New-PSItem East 111
New-PSItem West 122
New-PSItem South 200
New-PSItem NorthEast 103
New-PSItem SouthEast 145
New-PSItem SouthWest 136
New-PSItem South 127
New-PSItem NorthByNory 100
New-PSItem NothEast 110
New-PSItem Westerly 120
New-PSItem SouthWest 118
)
# in this example instead of doing $variable = New-Conditional text <parameters> .... ; Export-excel -conditionalText $variable <other parameters>
# the syntax is used is Export-excel -conditionalText (New-Conditional text <parameters>) <other parameters>
#$data | Export-Excel $f -Show -AutoSize -ConditionalText (New-ConditionalText -ConditionalType AboveAverage)
$data | Export-Excel $f -Show -AutoSize -ConditionalText (New-ConditionalText -ConditionalType BelowAverage)
#$data | Export-Excel $f -Show -AutoSize -ConditionalText (New-ConditionalText -ConditionalType TopPercent)