NewKev

I have a windows service application that watches a directory for a new file. When a file is dropped into the directory, the service attempts to create a new Excel.Application and load the file into a Workbook. When the code: App = new Excel.Application is called it fails with:

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

The exact same code works through my Windows Form test application from the same project.

I have strong named the assembly, granted full trust to the assembly, ensured the log on name of the assembly has administrative rights on the box, and changed the service to run under the Local Security context.

I have also attempted to use late binding - none of these actions have worked.

I would appreciate any ideas.

Thanks



Re: Visual Studio Tools for Office Excel.Application Fails when application running as a Service

Ashish Basran

Following might help you

http://support.microsoft.com/default.aspx/kb/870655






Re: Visual Studio Tools for Office Excel.Application Fails when application running as a Service

Andrew Whitechapel - MSFT

I'm afraid server-side automation of Office applications such as Excel is not supported.

http://support.microsoft.com/ id=257757





Re: Visual Studio Tools for Office Excel.Application Fails when application running as a Service

tapir

Hi i have the same problem. My service throws same error. Have you found the solution or an alternative way. Thanks





Re: Visual Studio Tools for Office Excel.Application Fails when application running as a Service

Kiran Namballa

I have the same problem but my script runs fine from the QA server. However, when the job is kicked off from a Prod server, it fails saying there is no permission.

Permission denied: 'CreateObject'

I am completely out of ideas. Any suggestions Thanks.