473,320 Members | 1,845 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.

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 3973
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.