File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,15 @@ function Invoke-PowerShellNotebook {
1717 Write-Progress - Activity " Executing PowerShell code block - [$ ( Get-Date ) ]" - Status (-join $targetCode ) - PercentComplete (($idx + 1 ) / $codeBlockCount * 100 )
1818
1919 if ($AsExcel ) {
20+ if (! (Get-Module - ListAvailable ImportExcel - ErrorAction SilentlyContinue)) {
21+ throw " This feature requires the ImportExcel PowerShell module. Use 'Install-Module -Name ImportExcel' to get it from the PS Gallery."
22+ }
23+
2024 if ($idx -eq 0 ) {
2125 $notebookFileName = Split-Path $NoteBookFullName - Leaf
2226 $xlFileName = $notebookFileName -replace " .ipynb" , " .xlsx"
2327
24- $xlfile = " {0}\{1 }" -f $pwd.Path , $xlFileName
28+ $xlfile = " { 0 }\ { 1 }" -f $pwd.Path , $xlFileName
2529 Remove-Item $xlfile - ErrorAction SilentlyContinue
2630 }
2731
You can’t perform that action at this time.
0 commit comments