mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-11 05:43:17 +00:00
Resolve the path with ProviderPath for UNC
This commit is contained in:
@@ -21,13 +21,13 @@ Add-Type -Path "$($PSScriptRoot)\EPPlus.dll"
|
|||||||
if($Host.Version.Major -ge 5) {
|
if($Host.Version.Major -ge 5) {
|
||||||
. $PSScriptRoot\plot.ps1
|
. $PSScriptRoot\plot.ps1
|
||||||
|
|
||||||
function New-Plot {
|
function New-Plot {
|
||||||
[OutputType([PSPlot])]
|
[OutputType([PSPlot])]
|
||||||
param()
|
param()
|
||||||
|
|
||||||
[psplot]::new()
|
[psplot]::new()
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Write-Warning "PowerShell 5 is required for plot.ps1"
|
Write-Warning "PowerShell 5 is required for plot.ps1"
|
||||||
Write-Warning "PowerShell Excel is ready, except for that functionality"
|
Write-Warning "PowerShell Excel is ready, except for that functionality"
|
||||||
@@ -49,7 +49,7 @@ function Import-Excel {
|
|||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|
||||||
$Path = (Resolve-Path $Path).Path
|
$Path = (Resolve-Path $Path).ProviderPath
|
||||||
write-debug "target excel file $Path"
|
write-debug "target excel file $Path"
|
||||||
|
|
||||||
$stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path,"Open","Read","ReadWrite"
|
$stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path,"Open","Read","ReadWrite"
|
||||||
|
|||||||
Reference in New Issue
Block a user