473,706 Members | 2,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Exceptio n: Cannot create ActiveX component.

Source Error:

Line 34:
Line 35: ' Start Excel and get Application object.
Line 36: oXL = CreateObject("E xcel.Applicatio n")
Line 37: oXL.Visible = True
Line 38:
Nov 20 '05 #1
2 5505
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.Applicati on
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********@wik w.com> wrote in message
news:10******** *****@corp.supe rnews.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.Exceptio n: Cannot create ActiveX component.

Source Error:

Line 34:
Line 35: ' Start Excel and get Application object.
Line 36: oXL = CreateObject("E xcel.Applicatio n")
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.Applicati on
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********@wik w.com> wrote in message
news:10******** *****@corp.supe rnews.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.Exceptio n: Cannot create ActiveX component.

Source Error:

Line 34:
Line 35: ' Start Excel and get Application object.
Line 36: oXL = CreateObject("E xcel.Applicatio n")
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
4398
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 written in VB script, working with background SQL server 2000. The asp pages accept user input first, then pass to another ASP page to make out SQL query, then the vb script will retrive data from SQL server using ADO object, then creates an EXCEL...
5
1775
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 the solution provided is that between the export of data to Excel and destryoing of Excel's objects (calling NAR sub), I need to provide a prompt to the user to save file to a location, as per user's choice. However, If the user elects CANCEL...
1
304
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 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
6
1868
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? cheers... have a great Christmas all! -- Regards Luke. ----- There are 10 types of people in this world
1
1336
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 need some more componentes ? Thanks
5
3615
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 route by using late binding? Could someone please give me an example of using late binding for calling office apps? Thanks
3
2388
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 application to a server, I get: "System.Runtime.InteropServices.COMException (0x80040154): COM object with CLSID {00024500-0000-0000-C000-000000000046} is either not valid or not registered." I've seen several articles that mention ways to...
5
49815
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. To do this, I created a reference to "Microsoft Excel 11.0 Object Library", and have a "using Excel;" directive. I decided to add a method for creating a TextBox using the Shapes.AddTextBox method, which requires a
0
4131
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 OS, but after I discovered that it won't run on a system with Office 2003, I uninstalled Office 2007 and installed Office 2003. I reset the reference in .Net to the Microsoft Excel 11.0 Object Library. The application works fine from the ..Net...
0
8781
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
8697
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,...
0
9285
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9156
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9053
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
7908
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
4449
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
4709
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2502
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.