From 1d897286b7dce602fc76a7eb86afef852720e0f3 Mon Sep 17 00:00:00 2001 From: dfinke Date: Fri, 1 Jul 2016 15:55:15 -0400 Subject: [PATCH] Resolve the path with ProviderPath for UNC --- ImportExcel.psm1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ImportExcel.psm1 b/ImportExcel.psm1 index ae662b9..f28b0b3 100644 --- a/ImportExcel.psm1 +++ b/ImportExcel.psm1 @@ -21,13 +21,13 @@ Add-Type -Path "$($PSScriptRoot)\EPPlus.dll" if($Host.Version.Major -ge 5) { . $PSScriptRoot\plot.ps1 - function New-Plot { + function New-Plot { [OutputType([PSPlot])] param() - [psplot]::new() + [psplot]::new() } - + } else { Write-Warning "PowerShell 5 is required for plot.ps1" Write-Warning "PowerShell Excel is ready, except for that functionality" @@ -49,7 +49,7 @@ function Import-Excel { Process { - $Path = (Resolve-Path $Path).Path + $Path = (Resolve-Path $Path).ProviderPath write-debug "target excel file $Path" $stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path,"Open","Read","ReadWrite"