Problem with Imports Microsoft.Office.Interop

G

Guest

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.aspx?scid=kb;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 !!!
 
R

Rob Oldfield

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.aspx?scid=kb;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.
 
C

Cor Ligthert

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
 
C

Cor Ligthert

Hi Rob,

The last row disappeared when I changed it sorry

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

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top