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

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 20 '05 #1
1 3976
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 20 '05 #2

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

Similar topics

0
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
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...

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.