Excel, save and close after run

前端 未结 5 804
执笔经年
执笔经年 2020-12-06 08:16

how can I save the below script after it has run?

Script is from: Powershell Disk Usage Report

$erroractionpreference = \"SilentlyContinue\"
$a = New         


        
5条回答
  •  天涯浪人
    2020-12-06 08:44

    Creating the Excel file:

    $Excel = New-Object -ComObject Excel.Application
    $Excel.Visible = $True 
    ......
    

    Closing down the Excel:

    $Excel.Close()
    [System.Runtime.Interopservices.Marshal]::ReleaseComObject($Excel)
    spps -n Excel
    

提交回复
热议问题