mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-03-01 02:41:20 +00:00
Added try/catch
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
$file = ".\conditionalTextFormatting.xlsx"
|
||||
rm $file -ErrorAction Ignore
|
||||
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
||||
|
||||
Get-Service |
|
||||
Select Status, Name, DisplayName, ServiceName |
|
||||
$file = ".\conditionalTextFormatting.xlsx"
|
||||
Remove-Item $file -ErrorAction Ignore
|
||||
|
||||
Get-Service |
|
||||
Select-Object Status, Name, DisplayName, ServiceName |
|
||||
Export-Excel $file -Show -AutoSize -AutoFilter -ConditionalText $(
|
||||
New-ConditionalText stop
|
||||
New-ConditionalText stop
|
||||
New-ConditionalText runn darkblue cyan
|
||||
New-ConditionalText -ConditionalType EndsWith svc wheat green
|
||||
New-ConditionalText -ConditionalType BeginsWith windows darkgreen wheat
|
||||
New-ConditionalText -ConditionalType EndsWith svc wheat green
|
||||
New-ConditionalText -ConditionalType BeginsWith windows darkgreen wheat
|
||||
)
|
||||
Reference in New Issue
Block a user