473,833 Members | 2,132 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Unauthor izedAccessExcep tion: 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 5355
"Jerry C" <je*****@nospam .nospamwrote in message
news:2B******** *************** ***********@mic rosoft.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.mic rosoft.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****@microsof t.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.mic rosoft.comwrote in message
news:UY******** *****@TK2MSFTNG HUB02.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.com wrote in message
news:%2******** ********@TK2MSF TNGP06.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.com wrote in message
news:eH******** ******@TK2MSFTN GP02.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
2468
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 : although i am from Greece, i am using the English Versions of both Windows 2000 and Excel XP, but in my regional settings i have selected "Greek". If i dont change the regional setting i get the following error "Old format
16
48894
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 a commercial program such as Adobe Acrobat and its associated API. The technique uses Ghostscript and Redirection Port Monitor - two free programs for creating PDF documents provided free by Russell Lang. The actual automation requires VBA...
1
2128
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) if that particular Excel is alreay launch, get the Excel Object 3) run a macro on the Excel Object I made some progress using
11
1902
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 pulled from an old UNIX based system, then converted to Excel. I want the user to be able to use the web app to select and upload the file to the server, then press a button to have the SQL server process the Excel file and import it. I know I can do...
4
1847
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 the excel function -- 'Excel.Workbooks.Open("C:\Filename.xls")' it pops up an error msg -- 'object reference not set to an instance of an object'
3
4907
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 cannot find a way to trigger a button click event from Excel for an Access form. To be more precise, I have Access db called a.mdb. a.mdb has a.form and a.command button inside the form I have xls sheet called b.xls. How I will fire an onclick event...
15
9446
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. http://www.mscibarra.com/webapp/indexperf/excel?priceLevel=0&scope=0&currency=15&style=C&size=36&market=1897&asOf=Jul+25%2C+2008&export=Excel_IEIPerfRegional Want to write python to download and save the file. So far I've arrived at this:
2
1512
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 in .NET? -- Alexander L. Wykel AW Software Works
0
3483
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 obtain data in a range using arrays" (URL: http://support.microsoft.com/kb/308407), and I run into same problem as described in the MSDN Forums "Newbie Q regarding MFC automation client app"...
0
9796
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10543
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9323
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6951
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5624
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5789
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3972
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3078
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.