mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-20 09:23:56 +00:00
Added try/catch
This commit is contained in:
@@ -1,23 +1,25 @@
|
||||
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
||||
|
||||
$f = ".\testExport.xlsx"
|
||||
|
||||
rm $f -ErrorAction Ignore
|
||||
Remove-Item $f -ErrorAction Ignore
|
||||
|
||||
$data = $(
|
||||
|
||||
New-PSItem North 111 (echo Region Amount )
|
||||
New-PSItem East 11
|
||||
New-PSItem West 12
|
||||
New-PSItem South 1000
|
||||
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 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
|
||||
)
|
||||
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)
|
||||
Reference in New Issue
Block a user