473,412 Members | 2,003 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,412 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 8163
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.