By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,994 Members | 1,621 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,994 IT Pros & Developers. It's quick & easy.

VB.Net (in ASP.Net) won't create instance of Excel

P: n/a
I was able to get procedure to work in a VB.Net Windows application, and want
to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Office.Interop.Excel.Application
xlApp = CreateObject("Excel.Application") '**** Blows-up here *****

Error Exception Details:
System.Exception: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String
ServerName)
ReserveDB.WebForm1.btCreateDB_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:40
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()

Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
August 10, 2005

I believe it is a security issue by this line from the stack trace: "
[Exception: Cannot create ActiveX component.]" You might check your security
settings and make sure that you have the ability to create ActiveX
components. Hope this helps and have a great day!
--
Joseph Bittman
Microsoft Certified Solution Developer

Web Site: http://71.39.42.23
Static IP


"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
I was able to get procedure to work in a VB.Net Windows application, and
want
to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Office.Interop.Excel.Application
xlApp = CreateObject("Excel.Application") '**** Blows-up here
*****

Error Exception Details:
System.Exception: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String
ServerName)
ReserveDB.WebForm1.btCreateDB_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:40
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()

Nov 21 '05 #2

P: n/a
Hi,

Dont automate excel to create a spread sheet. Transform an xml
spreadsheet into a xls.
http://support.microsoft.com/kb/319180/EN-US/

Ken
-----------------------------
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
I was able to get procedure to work in a VB.Net Windows application, and
want
to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Office.Interop.Excel.Application
xlApp = CreateObject("Excel.Application") '**** Blows-up here *****

Error Exception Details:
System.Exception: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String
ServerName)
ReserveDB.WebForm1.btCreateDB_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:40
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()


Nov 21 '05 #3

P: n/a
Joseph -

Thanks for the comments.

Can you walk me through the process of "check your security settings and
make sure that you have the ability to create ActiveX components"?

Thanks,
Mark

"Joseph Bittman MCSD" wrote:
August 10, 2005

I believe it is a security issue by this line from the stack trace: "
[Exception: Cannot create ActiveX component.]" You might check your security
settings and make sure that you have the ability to create ActiveX
components. Hope this helps and have a great day!
--
Joseph Bittman
Microsoft Certified Solution Developer

Web Site: http://71.39.42.23
Static IP


"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
I was able to get procedure to work in a VB.Net Windows application, and
want
to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Office.Interop.Excel.Application
xlApp = CreateObject("Excel.Application") '**** Blows-up here
*****

Error Exception Details:
System.Exception: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String
ServerName)
ReserveDB.WebForm1.btCreateDB_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:40
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()


Nov 21 '05 #4

P: n/a
Ken -

Thanks for the idea.

All I'm doing is using ASP (VB.Net) as a sort of wrapper. I open the
exiting Excel workbook, run its VBA procedure, close the workbook. Boom done.

Any idea why I get the error message "Cannot create ActiveX component"?

Thanks, Mark

"Ken Tucker [MVP]" wrote:
Hi,

Dont automate excel to create a spread sheet. Transform an xml
spreadsheet into a xls.
http://support.microsoft.com/kb/319180/EN-US/

Ken
-----------------------------
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:E0**********************************@microsof t.com...
I was able to get procedure to work in a VB.Net Windows application, and
want
to get it to work within a ASP.Net page. It won't create the instance of
Excel. It blows up on the CreateObject class.

What am I missing?

Code, Error and Stack info are as follows:

Code:
Dim xlApp As Microsoft.Office.Interop.Excel.Application
xlApp = CreateObject("Excel.Application") '**** Blows-up here *****

Error Exception Details:
System.Exception: Cannot create ActiveX component.

Stack Trace:
[Exception: Cannot create ActiveX component.]
Microsoft.VisualBasic.Interaction.CreateObject(Str ing ProgId, String
ServerName)
ReserveDB.WebForm1.btCreateDB_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\ReserveDB\WebForm1.aspx.vb:40
System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
System.Web.UI.Page.ProcessRequestMain()


Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.