473,403 Members | 2,366 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,403 software developers and data experts.

ActiveX component can't create object: 'Excel.Application' error ONLY in IIS

Hi,

I have a simple web page that starts Excel and fills it with some
dummy data. Using IE I can run this web page from the C: drive (IE: "C:
\startexcel.htm") and it runs fine. However, when I put the web page
in the wwwroot directory in IIS and try to run it there (IE: "http://
startexcel.htm") it gives me the error:

Error: ActiveX component can't create object: 'Excel.Application'

The code line that fires the error can be seen below:

<SCRIPT LANGUAGE="VBScript">

sub button1_onclick()

' Launch Excel
dim app
set app = createobject("Excel.Application")

end sub

Is there a way to start Excel from IIS using VBScript? Or JavaScript
even?

Thanks
Steve

Jul 17 '07 #1
4 25555
This is not allowed by default for obvious safety reasons.. You would need
to alter the default security settings to do that (such as adding your site
to a trusted zone and allowing activex control not marqued as safe).

--
Patrice

"Steve Kershaw" <st***********@yahoo.coma écrit dans le message de news:
11**********************@g12g2000prg.googlegroups. com...
Hi,

I have a simple web page that starts Excel and fills it with some
dummy data. Using IE I can run this web page from the C: drive (IE: "C:
\startexcel.htm") and it runs fine. However, when I put the web page
in the wwwroot directory in IIS and try to run it there (IE: "http://
startexcel.htm") it gives me the error:

Error: ActiveX component can't create object: 'Excel.Application'

The code line that fires the error can be seen below:

<SCRIPT LANGUAGE="VBScript">

sub button1_onclick()

' Launch Excel
dim app
set app = createobject("Excel.Application")

end sub

Is there a way to start Excel from IIS using VBScript? Or JavaScript
even?

Thanks
Steve

Jul 17 '07 #2
Running Office applications from an IIS web server is not recommended and
not supported. These apps were never designed to be ASP COM components that
you can run in a web page. You can use the Office Web Components package if
you meet the required licensing requirements.

-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com

"Steve Kershaw" wrote:
Hi,

I have a simple web page that starts Excel and fills it with some
dummy data. Using IE I can run this web page from the C: drive (IE: "C:
\startexcel.htm") and it runs fine. However, when I put the web page
in the wwwroot directory in IIS and try to run it there (IE: "http://
startexcel.htm") it gives me the error:

Error: ActiveX component can't create object: 'Excel.Application'

The code line that fires the error can be seen below:

<SCRIPT LANGUAGE="VBScript">

sub button1_onclick()

' Launch Excel
dim app
set app = createobject("Excel.Application")

end sub

Is there a way to start Excel from IIS using VBScript? Or JavaScript
even?

Thanks
Steve

Jul 17 '07 #3
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrote
in message news:98**********************************@microsof t.com...
Running Office applications from an IIS web server is not recommended and
not supported. These apps were never designed to be ASP COM components
that
you can run in a web page.
True, but the OP is not trying to do this - he's trying to make an aspx page
launch Excel client-side and, of course, default security settings won't
allow this...
You can use the Office Web Components package if you meet the required
licensing requirements.
Microsoft has discontinued OWC:
http://blogs.msdn.com/excel/archive/...17/668544.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 17 '07 #4
Right but if you read that post, they haven't "discontinued" OWC - they just
aren't shipping any new versions. You can also use OWC on the client, as I
recall.
Peter

--
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com

"Mark Rae [MVP]" wrote:
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yohohhoandabottleofrum.comwrote
in message news:98**********************************@microsof t.com...
Running Office applications from an IIS web server is not recommended and
not supported. These apps were never designed to be ASP COM components
that
you can run in a web page.

True, but the OP is not trying to do this - he's trying to make an aspx page
launch Excel client-side and, of course, default security settings won't
allow this...
You can use the Office Web Components package if you meet the required
licensing requirements.

Microsoft has discontinued OWC:
http://blogs.msdn.com/excel/archive/...17/668544.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 17 '07 #5

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

Similar topics

2
by: brazilnut | last post by:
Hi. Let me explain the setup. I am using Visual Studio .NET to develop a sort of add-in (COM class) for Excel called SQLAddin. It basically queries a SQL server and pulls in data. Now within my...
2
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class...
0
by: Andreas | last post by:
Hi, I have an application that reads some data from an Excel file and uses the Excel ActiveX object to do this. I have written a function that opens the document and reads a value out. This...
6
by: Steve Richter | last post by:
I am getting error in a vbscript: ActiveX component cant create object: Excel.Application. The vbscript code is: Dim objExcel Set objExcel = CreateObject("Excel.Application") I am pretty...
3
by: Steve Richter | last post by:
running a simple vbscript in an .htm page that starts excel and loads the spreadsheet with the contents of a <table> ... </table> getting an "Error: ActiveX component cant create object....
4
by: Patrick | last post by:
I have a middle tier object that generates Excel spreadsheet here is the code moExcel = CreateObject("Excel.Application") moWorkBook = moExcel.Workbooks.Add moSheet =...
4
by: Abdhul Saleem | last post by:
Hi, I am recieving error ActiveX component can't create object in the following line in the asp page. set ExcelApp = CreateObject("Excel.Application") Previously this code was working fine....
3
by: Administrator | last post by:
Hi, My web development server is a Windows 2000 SP4 system. Had created an aspx page with the following code which I had extracted from 1 of the Microsoft websites: Dim oExcel As Object Dim...
2
by: stjones1 | last post by:
My company has implementd Vista with IE7 and office 2007. We also use Sharepoint extensively for team sites and division portals. I am in Sharepoint consultation/support. One user just moved a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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...

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.