更新时间:2022-12-01 21:24:53
您需要将其作为ComObject打开.
You need to open it as a ComObject.
$Excel = New-Object -ComObject Excel.Application
$Workbook = $Excel.Workbooks.Open($FilePath)
在该示例中,您需要将$FilePath
定义为要打开的Excel文件的完整路径.
In that example you would have needed to define $FilePath
as the full path to the Excel file that you are trying to open.