Only load PS Class for -gt V5. Thanks https://github.com/W1M0R

This commit is contained in:
dfinke
2016-04-30 15:23:13 -04:00
parent 28dab9a626
commit 045234dd81

View File

@@ -16,15 +16,23 @@ Add-Type -Path "$($PSScriptRoot)\EPPlus.dll"
. $PSScriptRoot\Get-HtmlTable.ps1
. $PSScriptRoot\Import-Html.ps1
. $PSScriptRoot\Get-Range.ps1
. $PSScriptRoot\plot.ps1
function New-Plot {
[OutputType([PSPlot])]
param()
if($Host.Version.Major -ge 5) {
. $PSScriptRoot\plot.ps1
[psplot]::new()
function New-Plot {
[OutputType([PSPlot])]
param()
[psplot]::new()
}
} else {
Write-Warning "PowerShell 5 is required for plot.ps1"
Write-Warning "PowerShell Excel is ready, except for that functionality"
}
function Import-Excel {
param(
[Alias("FullName")]