473,396 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

automate Excel in server 2008

I have a web site that automates excel.
This site runs in server 2003. iis 6.0 office 2003 installed
I moved this app to server 2008 iis 7.0 office 2003 installed

Now when I try to automate excel I get the error
Retrieving the COM class factory for component with CLSID
{00024500-0000-0000-C000-000000000046} failed due to the following error:
80070005.

System.UnauthorizedAccessException: Retrieving the COM class factory for
component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the
following error: 80070005.
The key is the CLSID. I cannot find it in the registry. I searched for it.

The component services com+ management console has the Microsoft excel
object in it but it has the
AppID 00020812-0000-0000-C000-000000000046.

I set permissions the same in both sites. App pool idenitites are the same.

I find some posts on the net but no solutions.

Hope someone can help.

Thank you,



--
Jerry
Nov 4 '08 #1
8 5331
"Jerry C" <je*****@nospam.nospamwrote in message
news:2B**********************************@microsof t.com...
I have a web site that automates Excel.
No need to go any further than that... Server-side Office automation is not
supported by Microsoft because the Office components are not designed to be
used in this way:
http://support.microsoft.com/default...US;q257757#kb2
http://support.microsoft.com/default.aspx/kb/288367
Now when I try to automate Excel I get the error
Retrieving the COM class factory for component with CLSID
{00024500-0000-0000-C000-000000000046} failed due to the following error:
80070005.
See above.
Hope someone can help.
http://www.aspose.com/categories/fil...a/default.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 4 '08 #2
Hello Jerry,

Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou
[MSFT] and I will be working on this issue with you.

As Mark already pointed, the Server Side Office Automation is not
recommended and supported from Microsoft because Office application is not
designed for such an objective. You can get the detailed information from
the KB article Mark posted.

As to this issue itself, technically speaking, we receive this error
because the Excel application can only be activated under the following
accounts,
*Administrator
*System
*Interactive

But in the Windows Server 2008 and IIS7, the ASP.NET work process w3wp.exe
runs under the NETWORK SERVICE account. So, you need to configure this
account in the Component Services MMC. You can get a detailed steps in the
following article. Note that we should add the NETWORK SERVICE account
instead of the ASPNET.
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

With the configuration in the above link, it works on my side. Please let
me know if this works for your not?

Have a nice day!

Best regards,
Ji Zhou (v-****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 5 '08 #3
"""Ji Zhou [MSFT]""" <v-****@online.microsoft.comwrote in message
news:UY*************@TK2MSFTNGHUB02.phx.gbl...
As Mark already pointed, the Server Side Office Automation is not
recommended and supported from Microsoft because Office application is not
designed for such an objective. You can get the detailed information from
the KB article Mark posted.
That's correct.
http://blog.crowe.co.nz/archive/2006/03/02/589.aspx

With the configuration in the above link, it works on my side.
Why are you advising someone to try a totally unsupported hack...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 5 '08 #4
Mark Rae [MVP] wrote:
With the configuration in the above link, it works on my side.

Why are you advising someone to try a totally unsupported hack...?
Mark,
I work developing a third party component for creating Excel files
without OLE, so I mostly agree with you (except for the recommended
third party lib of course ;) )

But, not every situation is the same, and there are cases where the
only option is to automate Excel, as slow and crash-prone as that is.
For obvious reasons I am not familiar with the library you recommended
(I use mine), but let's imagine I want to run a macro in the server. Or
embed a flash activex and a word document inside the xls file. Or
create Excel files that query a database. Can I do it? (Sincere
question, as said I don't know this particular library) Or a million
features that Excel supports and that might not be supported by the
library.

There *are* valid reasons why someone would want to go with ole
automation in the server (or even in the client, I don't think ole is
very good for client apps either). If you can deal with slowness, going
to the server and killing the hanging excel process once in a while,
and not many people is using the app, OLE can be a valid solution. Not
all apps are the same, and not everybody is google serving millions of
requests per second.

All this said, I myself wouldn't go with OLE Automation unless there is
no any other possible solution, and not just for servers, for clients
too.

But for those cases, what Ji Zhou suggested is a valid and welcome
advise.

Kind Regards,
Adrian.
Nov 6 '08 #5
"Adrian Gallero" <adrian@[nospam]tmssoftware.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
there are cases where the only option is to automate Excel,
No there aren't...
For obvious reasons I am not familiar with the library you recommended
(I use mine), but let's imagine I want to run a macro in the server. Or
embed a flash activex and a word document inside the xls file. Or
create Excel files that query a database. Can I do it?
Yes.
There *are* valid reasons why someone would want to go with OLE
automation in the server
Name one...
But for those cases, what Ji Zhou suggested is valid and welcome
advice.
And what will you do when it stops working, as it inevitably will? Who will
help you then? No point calling Microsoft...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 6 '08 #6
there are cases where the only option is to automate Excel,

No there aren't...
but let's imagine I want to run a macro
in the server.
Yes.
If you can run a macro in the server, that can also call activex
controls btw, then you have a huge security hole, and this solution
won't probably be better/more stable than automating Excel. The extra
stability you get with third party solutions sometimes comes from the
fact that they can't do anything Excel does.
>
There are valid reasons why someone would want to go with OLE
automation in the server

Name one...
Are you *sure* you can do those things? I am not speaking about
creating files that have macros or embedded activex controls, I am
speaking about running those macros or having those activex work.

As said, I don't know about the components you posted, but I downloaded
their brochure and they say for example: You can also change the source
data of a Pivot Table at
runtime." But can you create a new pivot table from scratch? We can
also modify pivot tables, but in our case we won't allow you to create
a new one from 0. If they can, why isn't that mentioned? Why don't they
mention anything about running macros or activex controls?
>
But for those cases, what Ji Zhou suggested is valid and welcome
advice.

And what will you do when it stops working, as it inevitably will?
Who will help you then? No point calling Microsoft...
As said, not all apps are the same. Sometimes it won't matter that it
will stop working. Maybe the app is going to be used for a transition
period for example. (while those xls files are transferred to the
database).

I am doing kind of a devils advocate here, if I didn't think ole
automation is not the solution for serious apps I wouldn't be
developing an alternative. But not all apps are "serious" apps. you
would be amazaed at all the "throwaway" apps that are created in most
business.

Nov 6 '08 #7
"Adrian Gallero" <adrian@[nospam]tmssoftware.comwrote in message
news:eH**************@TK2MSFTNGP02.phx.gbl...
But can you create a new pivot table from scratch?
http://www.aspose.com/documentation/...overloads.html
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Nov 6 '08 #8
Mark Rae [MVP] wrote:

>
http://www.aspose.com/documentation/...overloads.html

Nice, but that is just one fature. I don't see anythinga bout macro
support yet, and actually, searching for macros in their forums you can
find this thread:
http://www.aspose.com/community/foru...acros-now.aspx

"We do not support to create or manage vba macros although you can
create a button control using Aspose.Cells APIs."

So, here we are not even speaking about running macros (my original
question), just creating them and it doesn't seem supported. Ok, the
thread is a year old, but I hightly doubt they added a full VBA
interpreter (besides ability to write macros) in that time, and that it
isn't advertized anywhere. And even if it did have its own VBA
interpreter, how good is it? Can it run anything Excel can?

So my point stands. If you can't run macros, you can't for example use
custom formulas (like all the functions in the "packs" that Excel
includes, finantial pack, etc). In our case, even when we won't run
macros, we offer the ability to define them in .net and they will be
used in the recalculation, but it is not the same. If you are using
hunderds of custom formulas anything but natively running macros would
not be an option. Even if you have to restart your server from time to
time.

how about solver? Does this component implement the solver?

Well, I am tired of being devil's advocate. I think we actually mostly
agree, I believe third party solutions are best for 99% of the cases,
or I wouldn't be developing one. I just can't agree with:
>>there are cases where the only option is to automate Excel,
>No there aren't...
If you think world is so black and white and there are absolutely no
cases where you would need to automate the real Excel, I don't think
you have seen the spreadsheets I have. But well, to each his own.

Regards,
Adrian.

Nov 6 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Giorgos Zagouras | last post by:
Hello every one..... i have a windows application an i am trying to get some data from SQL Server and export them to Excel. I am using Windows 2000 and Excel XP. I have the following problem :...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
1
by: Michael Wu | last post by:
I wonder if anyone can shed some light on how to automate Excel from a C# program. What I like to do is this, 1) Find if an Excel spreadsheet is alreay opened (identify the Excel file path) 2)...
11
by: David Lozzi | last post by:
Hello, I need to automate importation of a excel file into a table. Here's my scenario: I'm writing an ASP.NET application where users can pull reports on imported data. The imported data is...
4
by: Ivan | last post by:
Hi All, I have tried to automate excel in vb.net and i found a problem that i can't find the solution in anywhere... i hope someone can help me in this group.... the problem is i try using...
3
by: aniphilip | last post by:
Hi All, I have a requirement to automate Access functionality from Excel. I need to open Access, trigger button events and close Access from Excel. I Achieved opening Access from Excel. I...
15
by: patf | last post by:
Hi - experienced programmer but this is my first Python program. This URL will retrieve an excel spreadsheet containing (that day's) msci stock index returns. ...
2
by: =?Utf-8?B?QWxleGFuZGVyIFd5a2Vs?= | last post by:
Is it possible to automate a COM object ebmeded in an excel document run the process and return the results in a C# .NET application? Or better yet extract the com object some how and just run it...
0
by: ishay44 | last post by:
Hello! I try to build (using Visual 2005 and Excel 2007) the example described in the Microsoft Help and Support "How to automate Excel from MFC and Visual C++ 2005 or Visual C++ .NET to fill or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.