473,320 Members | 1,969 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,320 software developers and data experts.

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 5478
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael | last post by:
Hi All, I am using win2k advance sever, IIS + ASP + Office 2000 +SQL server 2000 I have a internal web site, running on IIS. it is for internal reporting purpose. All the ASP web pages are...
5
by: al | last post by:
Greetings, I used article Q317109 (http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q317109) to solve the problem of Excel prcocess does not stop after close. The problem I faced with...
1
by: Business Information Systems, Inc. | last post by:
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...
6
by: Luke Vogel | last post by:
Hi all ... could someone point me in the right direction for programming office applications (specifically excel) using vb.net? Can vb.net replace or enhance VBA that comes with the office suite?...
1
by: Alberto | last post by:
Hi all. I'd like to know if the "architect" version of Visual Studio .NET includes the environment to develop Office application. Any way is it possible to devolpo Office XP apps with VS .Net or I...
5
by: John | last post by:
Hi I need to call methods from office apps from my vb.net app. Some of my clients are still on office 2000 so to maintain compatibility I can not use office 2003 PIA. Can I avoid the whole PIA...
3
by: ChrisFrohlich | last post by:
I'm trying to use the Office XP PIA in an ASP.NET application. It's working fine on my workstation and I can manipulate a Workbook using Microsoft.Office.Interop.Excel. When I try to deploy the...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
0
by: Bill Fallon | last post by:
I am developing a VB.Net application with VS 2005 that opens an Excel workbook and populates the worksheet with data. I started developing the application with Office 2007 installed on my Vista...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.