Glowie
Glowie

Reputation: 2309

Error "Retrieving the COM class factory for component with CLSID" when starting Excel

I am running PowerShell on 64-bit machine. The line

$excel = New-Object -ComObject Excel.Application

gives the error

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

C:\Windows\SysWOW64\WindowsPowerShell\v1.0

as explained here, but I still get the error.

Upvotes: 5

Views: 30208

Answers (2)

David Brabant
David Brabant

Reputation: 43559

Well, here it is then: you have to install Office 64bit.

Upvotes: 8

Glowie
Glowie

Reputation: 2309

I installed Office 2007 on the server and it now works

Upvotes: 2

Related Questions