473,505 Members | 13,982 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

QueryInterface for interface Excel._Application failed

KC
Hi Gurus,
I am having problem opening an excel file from vb.net. My code looks like
this:

Dim EXL as Excel.Application
Dim wrkbook As Excel.Workbook

EXL = GetObject("", "Excel.Application")
EXL = CreateObject("Excel.Application")
wrkbook = EXL.Workbooks.Open("D:\Book1.xls")

It works fine on my Dev box. But when I move to my test server where I don't
have dotnet IDE. All I have is .NET framework 1.1 and Excel XP (same as
Dev).

It seems to work fine until it creates EXL object but it fails on "wrkbook
= EXL.Workbooks.Open("D:\Book1.xls").
The error i get is "QueryInterface for interface Excel._Application failed".

I have Microsoft Excel 10.0 library set as reference..

Has anyone encountered same problem? Please help..

Thanks..
Nov 15 '05 #1
1 2265
Here's an article that may be able to help:
http://www.aspnetpro.com/NewsletterA...200309so_l.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"KC" <ch*****@hotmail.com> wrote in message
news:e1**************@TK2MSFTNGP11.phx.gbl...
Hi Gurus,
I am having problem opening an excel file from vb.net. My code looks like
this:

Dim EXL as Excel.Application
Dim wrkbook As Excel.Workbook

EXL = GetObject("", "Excel.Application")
EXL = CreateObject("Excel.Application")
wrkbook = EXL.Workbooks.Open("D:\Book1.xls")

It works fine on my Dev box. But when I move to my test server where I don't have dotnet IDE. All I have is .NET framework 1.1 and Excel XP (same as
Dev).

It seems to work fine until it creates EXL object but it fails on "wrkbook = EXL.Workbooks.Open("D:\Book1.xls").
The error i get is "QueryInterface for interface Excel._Application failed".
I have Microsoft Excel 10.0 library set as reference..

Has anyone encountered same problem? Please help..

Thanks..

Nov 15 '05 #2

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

Similar topics

0
417
by: Jason | last post by:
I'm writing a small console app in .NET that needs to reference a 3rd party dll. I wrote the app by adding a reference to the 3rd party dll in my project and my code builds and executes...
0
1238
by: Deeps | last post by:
Hi I have created an interface called IGlobal with some properties exposed with a fixed Guid. Created a class inherting this interface. This is my com+ server. I have a client instantiating this...
4
4891
by: Ram | last post by:
I am running a test web site on my own Win2k professional computer. I have a VB6 COM component (running on COM+) on a seperate application runnint as "Server". When running an ASP.NET page calling...
2
2242
by: Dominique MILLOT | last post by:
Hello, With Asp.Net, I try to generat a document with an Excel object. This is the begin of my procedure: Dim xapExcel As Excel.Application xapExcel = New Excel.Application()...
3
2443
by: Von Shean | last post by:
I am trying to user Bulk loader component in asp.net. The code runs perfectly fine in a test harness but gives the following error when used in a strong named dll called from asp.net using c#. The...
1
2345
by: Michael Connerton | last post by:
The company I work for still uses Excel97. In a weaker moment I added the pia for Excel2003 in attempt to get more programatic functionality out of some Excel interfaces I have been writing. The...
1
1296
by: Ugo | last post by:
Hi, I have just followed the Microsoft Knowledge Base Article - 302084 How to Automate Microsoft Excel from Microsoft Visual C# .Net http://support.microsoft.com/default.aspx?kbid=302084 and I...
1
1314
by: adiel_g | last post by:
Hello, I have created a activeX dll in vb6 that contains some functions I am using in .NET. I created the dll in vb6 with: Instancing = 5-Multiuse MTSTransactionMode = 2-RequiresTransaction...
1
2778
by: Joseph | last post by:
I have been using "XMLHTTPClass" in an asp.net module. It is properly referenced and was working up until recently. Now it is failing with the error message "QueryInterface for interface...
2
3234
by: Stan | last post by:
Hello All: Don;t know if this is the correct group to post this in but here goes. Getting this error when trying to create excel object using Outlook Web Components on our web server. Any help...
0
7098
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
7303
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,...
0
7367
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...
1
7018
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...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.