mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-10 13:23:29 +00:00
Added try catch for psd1 loading so it can be copy pasted to the console
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
rm temp.xlsx -ErrorAction Ignore
|
||||
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
||||
|
||||
$data = invoke-sum (ps) company handles,pm,VirtualMemorySize
|
||||
Remove-Item temp.xlsx -ErrorAction Ignore
|
||||
|
||||
$data = invoke-sum (Get-Process) company handles,pm,VirtualMemorySize
|
||||
|
||||
$c = New-ExcelChart -Title Stats `
|
||||
-ChartType LineMarkersStacked `
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
rm temp.xlsx -ErrorAction Ignore
|
||||
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
||||
|
||||
Remove-Item temp.xlsx -ErrorAction Ignore
|
||||
|
||||
$data = @"
|
||||
A,B,C,Date
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
rm *.xlsx
|
||||
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
||||
|
||||
Remove-Item *.xlsx
|
||||
|
||||
$data = @"
|
||||
ID,Product,Quantity,Price,Total
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
try {. $PSScriptRoot\..\..\LoadPSD1.ps1} catch {}
|
||||
|
||||
function plot {
|
||||
param(
|
||||
$f,
|
||||
@@ -9,7 +11,7 @@ function plot {
|
||||
$maxx=[math]::Round($maxx,1)
|
||||
|
||||
$file = 'C:\temp\plot.xlsx'
|
||||
rm $file -ErrorAction Ignore
|
||||
Remove-Item $file -ErrorAction Ignore
|
||||
|
||||
$c = New-ExcelChart -XRange X -YRange Y -ChartType Line -NoLegend -Title Plot -Column 2 -ColumnOffSetPixels 35
|
||||
|
||||
|
||||
Reference in New Issue
Block a user