469,621 Members | 2,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,621 developers. It's quick & easy.

Office XP Excel - VB.Net Help Please

I keep receiving the following error when I try to access Office XP Excel
through VB.Net on a web form.

I have loaded and registered the Microsoft Office XP PIAs.

I have added a reference in the COM section to:
Microsoft ActiveX Data Objects 2.7 Library
Microsoft ActiveX Plugin
Microsoft Excel 10.0 Object Library
Microsoft Office XP Web Components

Help, what am I missing?
Thanks
Server Error in '/EMID0001' Application.
----------------------------------------------------------------------------
----

Cannot create ActiveX component.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

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

Source Error:

Line 34:
Line 35: ' Start Excel and get Application object.
Line 36: oXL = CreateObject("Excel.Application")
Line 37: oXL.Visible = True
Line 38:
Nov 20 '05 #1
2 5299
Don't use CreateObject. In .NET everything is an object, so you just need
to make an instance of it. Write the code this way:

' Start Excel and get Application object.
Dim oXL as new Excel.Application
oXL.Visible = True

Also, if it just Excel you want to use, you only need a reference to the
Excel Object Library.


"Business Information Systems, Inc." <in********@wikw.com> wrote in message
news:10*************@corp.supernews.com...
I keep receiving the following error when I try to access Office XP Excel
through VB.Net on a web form.

I have loaded and registered the Microsoft Office XP PIAs.

I have added a reference in the COM section to:
Microsoft ActiveX Data Objects 2.7 Library
Microsoft ActiveX Plugin
Microsoft Excel 10.0 Object Library
Microsoft Office XP Web Components

Help, what am I missing?
Thanks
Server Error in '/EMID0001' Application.
-------------------------------------------------------------------------- -- ----

Cannot create ActiveX component.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

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

Source Error:

Line 34:
Line 35: ' Start Excel and get Application object.
Line 36: oXL = CreateObject("Excel.Application")
Line 37: oXL.Visible = True
Line 38:

Nov 20 '05 #2
Don't use CreateObject. In .NET everything is an object, so you just need
to make an instance of it. Write the code this way:

' Start Excel and get Application object.
Dim oXL as new Excel.Application
oXL.Visible = True

Also, if it just Excel you want to use, you only need a reference to the
Excel Object Library.


"Business Information Systems, Inc." <in********@wikw.com> wrote in message
news:10*************@corp.supernews.com...
I keep receiving the following error when I try to access Office XP Excel
through VB.Net on a web form.

I have loaded and registered the Microsoft Office XP PIAs.

I have added a reference in the COM section to:
Microsoft ActiveX Data Objects 2.7 Library
Microsoft ActiveX Plugin
Microsoft Excel 10.0 Object Library
Microsoft Office XP Web Components

Help, what am I missing?
Thanks
Server Error in '/EMID0001' Application.
-------------------------------------------------------------------------- -- ----

Cannot create ActiveX component.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

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

Source Error:

Line 34:
Line 35: ' Start Excel and get Application object.
Line 36: oXL = CreateObject("Excel.Application")
Line 37: oXL.Visible = True
Line 38:

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Business Information Systems, Inc. | last post: by
6 posts views Thread by Luke Vogel | last post: by
1 post views Thread by Alberto | last post: by
5 posts views Thread by John | last post: by
3 posts views Thread by ChrisFrohlich | last post: by
5 posts views Thread by Michael Russell | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.