我正在64位计算机上运行PowerShell。该行代码
$excel = New-Object -ComObject Excel.Application
出现错误
New-Object : Retrieving the COM class factory for component with CLSID
{00000000-0000-0000-0000-000000000000} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG)).
我进行了研究并尝试运行了powershell_ise.exe
。
C:\Windows\SysWOW64\WindowsPowerShell\v1.0
如此处所述,但我仍然遇到了错误。