Problem with Imports Microsoft.Office.Interop

  • Thread starter Thread starter Guest
  • Start date Start date
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 !!!
 
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.
 
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
 
Hi Rob,

The last row disappeared when I changed it sorry

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

Cor
 
Back
Top