mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Fix path error in PSM1
This commit is contained in:
@@ -4,6 +4,32 @@ Add-Type -Path "$($PSScriptRoot)\EPPlus.dll"
|
||||
try {[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")}
|
||||
catch {Write-Warning -Message "System.Drawing could not be loaded. Color and font look-ups may not be available."}
|
||||
|
||||
foreach ($directory in @('ExportedCommands','Charting','InferData','Pivot')) {
|
||||
Get-ChildItem -Path "$PSScriptRoot\$directory\*.ps1" | ForEach-Object {. $_.FullName}
|
||||
}
|
||||
|
||||
if ($PSVersionTable.PSVersion.Major -ge 5) {
|
||||
. $PSScriptRoot\Plot.ps1
|
||||
|
||||
Function New-Plot {
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'New-Plot does not change system state')]
|
||||
Param()
|
||||
|
||||
[PSPlot]::new()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
Write-Warning 'PowerShell 5 is required for plot.ps1'
|
||||
Write-Warning 'PowerShell Excel is ready, except for that functionality'
|
||||
}
|
||||
|
||||
|
||||
. $PSScriptRoot\ArgumentCompletion.ps1
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
if (($IsLinux -or $IsMacOS) -or $env:NoAutoSize) {
|
||||
$ExcelPackage = [OfficeOpenXml.ExcelPackage]::new()
|
||||
$Cells = ($ExcelPackage | Add-WorkSheet).Cells['A1']
|
||||
@@ -27,30 +53,3 @@ if (($IsLinux -or $IsMacOS) -or $env:NoAutoSize) {
|
||||
$ExcelPackage | Close-ExcelPackage -NoSave
|
||||
}
|
||||
}
|
||||
|
||||
Get-ChildItem -Path "$PSScriptRoot\ExportedCommands\*.ps1" | ForEach-Object {. $_.FullName}
|
||||
|
||||
. $PSScriptRoot\Charting.ps1
|
||||
. $PSScriptRoot\Export-StocksToExcel.ps1
|
||||
. $PSScriptRoot\InferData.ps1
|
||||
. $PSScriptRoot\Pivot.ps1
|
||||
|
||||
|
||||
if ($PSVersionTable.PSVersion.Major -ge 5) {
|
||||
. $PSScriptRoot\Plot.ps1
|
||||
|
||||
Function New-Plot {
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'New-Plot does not change system state')]
|
||||
Param()
|
||||
|
||||
[PSPlot]::new()
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
Write-Warning 'PowerShell 5 is required for plot.ps1'
|
||||
Write-Warning 'PowerShell Excel is ready, except for that functionality'
|
||||
}
|
||||
#endregion
|
||||
|
||||
. $PSScriptRoot\ArgumentCompletion.ps1
|
||||
Reference in New Issue
Block a user