Question:
I am running PowerShell on 64-bit machine. The line
1 2 |
$excel = New-Object -ComObject Excel.Application |
gives the error
1 2 3 4 5 |
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)). |
I researched and tried to run powershell_ise.exe
from
1 2 |
C:\Windows\SysWOW64\WindowsPowerShell\v1.0 |
as explained here, but I still get the error.
Answer:
Well, here it is then: you have to install Office 64bit.