Excel interop problem. Access is denied.

A

Alex D.

Hi .I cant seem to find a way to authorize asp.net user to create an Excel
application using this: Microsoft.Office.Interop.Excel.ApplicationClass
excel = new Microsoft.Office.Interop.Excel.ApplicationClass();

I keep getting this error:
Retrieving the COM class factory for component with CLSID
{00024500-0000-0000-C000-000000000046} failed with HRESULT:
0x80070005(Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))).
I already assigned permissions to asp.net user in Control Panel->Component
Services-> DCOM Config->Microsoft Excel Application, but I am still unable
to create the Excel application.

(Windows XP Pro, Visual Studio.NET 2 Beta 2, Office 2003 Pro)

Please help!
 
S

Steve C. Orr [MVP, MCSD]

A

Alex D.

Problem is that at the beginning I used the lightweight OWC (Office Web
Components) but for some reason the calculations were wrong!! I just
populated some textboxes with the original content in the sheet cells and
the contents where different, even without changing anything.
Is there any bug in OWC, or am I missing something??
 
A

Alvin Bruney [Microsoft MVP]

Is there any bug in OWC, or am I missing something??
It's possible but highly unlikely since the OWC source code is a direct
decendant from desktop excel - that includes the calculation engine as well.
More than likely, you are probably inputing incorrect data or failing to
specify the correct range input.

If you care to post some code that reproduces the problem, I can take a
look.

--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc, Amazon, B&H etc
 
P

Paul Clement

¤ Hi .I cant seem to find a way to authorize asp.net user to create an Excel
¤ application using this: Microsoft.Office.Interop.Excel.ApplicationClass
¤ excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
¤
¤ I keep getting this error:
¤ Retrieving the COM class factory for component with CLSID
¤ {00024500-0000-0000-C000-000000000046} failed with HRESULT:
¤ 0x80070005(Access is denied. (Exception from HRESULT: 0x80070005
¤ (E_ACCESSDENIED))).
¤ I already assigned permissions to asp.net user in Control Panel->Component
¤ Services-> DCOM Config->Microsoft Excel Application, but I am still unable
¤ to create the Excel application.
¤
¤ (Windows XP Pro, Visual Studio.NET 2 Beta 2, Office 2003 Pro)

Below is some additional information concerning the use of Office application automation on the
server:

INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?scid=kb;en-us;257757


Paul
~~~~
Microsoft MVP (Visual Basic)
 
A

Alex D.

problem is that I am getting wrong calculations even without changing
anything, just displaying the original values. I found that is I change an
option (a value) then everything works ok....pretty weird...I am wondering
if the XML SpreadSheet format doesn't have a problem handling complex
sheets, may be with different cells formatting, etc..


Alvin Bruney said:
Is there any bug in OWC, or am I missing something??

It's possible but highly unlikely since the OWC source code is a direct
decendant from desktop excel - that includes the calculation engine as
well. More than likely, you are probably inputing incorrect data or
failing to specify the correct range input.

If you care to post some code that reproduces the problem, I can take a
look.

--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc, Amazon, B&H etc
-------------------------------------------------------------------------------


Alex D. said:
Problem is that at the beginning I used the lightweight OWC (Office Web
Components) but for some reason the calculations were wrong!! I just
populated some textboxes with the original content in the sheet cells and
the contents where different, even without changing anything.
Is there any bug in OWC, or am I missing something??
 
A

Alex D.

Thanks. I decided I wont use automation anymore, instead I'll stick with OWC
if I can find what my problem is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top