473,320 Members | 2,052 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.

Problem with Imports Microsoft.Office.Interop

Hi All,

I'm tring to write an application which open .xls files and get information
from them ( using .xls file as a database ).
According to the MSDN (
http://support.microsoft.com/default...b;EN-US;302094 )
I must add Microsoft Excel Object Library as an reference
OK
It works fine ... but
when I place the line

Imports Microsoft.Office.Interop

VB says : Namespace or type 'Interop' for the imports
'Microsoft.Office.Interop' cannot be found
I'm placing it ( Imports Microsoft.Office.Interop) over all code.

Thanks in advance !!!
Nov 20 '05 #1
8 8153
It depends on exactly what you're trying to achieve, but if you're just
after retrieving information from an Excel list then you're much better off
going for ADO - see
http://support.microsoft.com/default...b;EN-US;316934

Automation can be slow and it also bloats the size of your app - I had one
where the msi went from 1 Mb up to 4 Mb purely because I was forced to
include automation.
<t> wrote in message news:uj**************@tk2msftngp13.phx.gbl...
Hi All,

I'm tring to write an application which open .xls files and get information from them ( using .xls file as a database ).
According to the MSDN (
http://support.microsoft.com/default...b;EN-US;302094 )
I must add Microsoft Excel Object Library as an reference
OK
It works fine ... but
when I place the line

Imports Microsoft.Office.Interop

VB says : Namespace or type 'Interop' for the imports
'Microsoft.Office.Interop' cannot be found
I'm placing it ( Imports Microsoft.Office.Interop) over all code.

Thanks in advance !!!

Nov 20 '05 #2
It depends on exactly what you're trying to achieve, but if you're just
after retrieving information from an Excel list then you're much better off
going for ADO - see
http://support.microsoft.com/default...b;EN-US;316934

Automation can be slow and it also bloats the size of your app - I had one
where the msi went from 1 Mb up to 4 Mb purely because I was forced to
include automation.
<t> wrote in message news:uj**************@tk2msftngp13.phx.gbl...
Hi All,

I'm tring to write an application which open .xls files and get information from them ( using .xls file as a database ).
According to the MSDN (
http://support.microsoft.com/default...b;EN-US;302094 )
I must add Microsoft Excel Object Library as an reference
OK
It works fine ... but
when I place the line

Imports Microsoft.Office.Interop

VB says : Namespace or type 'Interop' for the imports
'Microsoft.Office.Interop' cannot be found
I'm placing it ( Imports Microsoft.Office.Interop) over all code.

Thanks in advance !!!

Nov 20 '05 #3
Hi Rob,

Ado.Net not ADO some think it is the same.

I assume that you know that however not everybody does as can see in a
message above this.

(Nice link by the way)

Cor
Nov 20 '05 #4
Hi Rob,

Ado.Net not ADO some think it is the same.

I assume that you know that however not everybody does as can see in a
message above this.

(Nice link by the way)

Cor
Nov 20 '05 #5
Hi Rob,

The last row disappeared when I changed it sorry

It is just to make you attent on it, nothing more.

Cor
Nov 20 '05 #6
Hi Rob,

The last row disappeared when I changed it sorry

It is just to make you attent on it, nothing more.

Cor
Nov 20 '05 #7
You're right Cor. I was just being lazy. Thanks for pointing it out.
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl...
Hi Rob,

The last row disappeared when I changed it sorry

It is just to make you attent on it, nothing more.

Cor

Nov 20 '05 #8
You're right Cor. I was just being lazy. Thanks for pointing it out.
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl...
Hi Rob,

The last row disappeared when I changed it sorry

It is just to make you attent on it, nothing more.

Cor

Nov 20 '05 #9

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

Similar topics

8
by: | last post by:
Hi All, I'm tring to write an application which open .xls files and get information from them ( using .xls file as a database ). According to the MSDN (...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
4
by: Irfan | last post by:
hi, Two questions, i dont know if the cause if these two problems is the same. 1. As soon as i Add->Reference -> Microsoft Excel 11.0 Object library. It gives an error 'The referenced...
1
by: Tory Collum | last post by:
My code works as a VB.NET executable file. So I'm trying to "adapt" it to a ..NET XML Web Service. As a VB.NET file, I used Microsoft.Office.Core as the reference, and everything was fine, but...
2
by: Miguel Arenas | last post by:
I want to develop a aplication with VB.2003 and Microsoft outlook 2003. I have this code. Imports OutLook = Microsoft.Office.Interop.Outlook Imports System.Reflection Private Sub...
5
by: C# newbie with big problems | last post by:
Ok, I've tried everything I could come up with but nothing is working. I am creating an application which needs to post information into an excel document. I have not yet had a chance to play with...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
0
by: chovatia.jaydeep | last post by:
Hi, I want to hide Menubar/Toolbar in Word/Excel 2007. I followed steps given in the link: http://msdn2.microsoft.com/en-us/library/aa338202.aspx Following above linke, i created Add-In...
0
by: insanomania911 | last post by:
I tried everything: - the refrerence to MS OFFICE 11.0 - Installed the PIA to the Office 2003 and made sure that the files are in the assembly folder When I add the reference I only get...
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...
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: 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.