Solved

PowerShell Error while accessing Excel COM Object

Posted on 2014-02-25
1
505 Views
Last Modified: 2014-02-25
I have powerShell script which uses below statement
$xlApp = New-Object -Com Excel.Application

When I try to run the script it gives the following error.

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

Could you tell what is wrong.
0
Comment
Question by:SURESH0518
1 Comment
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39885203
Hi,
afaik this code means: Access denied
Where/how do you run this script?
Can you try to open Powershell / ISE with Administrative privs? (right click -> run as admin)
Do you run the script in 32bit mode (assuming you have Excel not in 64bit installed)
HTH
Rainer
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to sign a powershell script so you can prevent tampering, and only allow users to run authorised Powershell scripts
In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now