Adding reference of Excel COM won't work

  • Thread starter Thread starter Eran.Yasso
  • Start date Start date
E

Eran.Yasso

Hi,

I have project that automate excel(using Excel COM) which works fine
in my home.
I took the project from my home to work and tried to build the project
but it won't built.
I get error "The type or namespace name 'Excel' could not be found".
the error points to line in my code: "public Excel.Application
ExcelObj = null".

I deleted the reference and added new "Excel 11.0". but that won't
help. I don't have problem in the code because it works on other
station. I have in all stations Office2003.
Do you think that i need to reinstall Excel?
Maybe the dll was corrupted?

TIA,
eyasso.
 
Hi,

I have project that automate excel(using Excel COM) which works fine
in my home.
I took the project from my home to work and tried to build the project
but it won't built.
I get error "The type or namespace name 'Excel' could not be found".
the error points to line in my code: "public Excel.Application
ExcelObj = null".

I deleted the reference and added new "Excel 11.0". but that won't
help. I don't have problem in the code because it works on other
station. I have in all stations Office2003.
Do you think that i need to reinstall Excel?
Maybe the dll was corrupted?

TIA,
eyasso.

When you install office on your computer you should select a custom
setup and install the interop assembly of office and then it will
work.
(If you don't know what the interop are just make a full installation
of everything...)
 
When you install office on your computer you should select a custom
setup and install the interop assembly of office and then it will
work.
(If you don't know what the interop are just make a full installation
of everything...)- Hide quoted text -

- Show quoted text -

thanks.
I'll check it.
 
When you install office on your computer you should select a custom
setup and install the interop assembly of office and then it will
work.
(If you don't know what the interop are just make a full installation
of everything...)

I'm doing OLE Automation of Excel, and did not have to change my current
installation of Office. I'm running Excel 2003.

Here are the references I have in my Project References:

Microsoft Excel 11.0 Object Library
Microsoft Office 11.0 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3
OLE Automation

Do you have
using Microsoft.Office.Interop;
at the top of your program?

Do you have the same version of Visual Studio at home and at work? Have you
tried running the compiled version from home on your work machine without
rebuilding it?

Does any of this information help?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.
 
I'm doing OLE Automation of Excel, and did not have to change my current
installation of Office. I'm running Excel 2003.

Here are the references I have in my Project References:

Microsoft Excel 11.0 Object Library
Microsoft Office 11.0 Object Library
Microsoft Visual Basic for Applications Extensibility 5.3
OLE Automation

Do you have
using Microsoft.Office.Interop;
at the top of your program?

Do you have the same version of Visual Studio at home and at work? Have you
tried running the compiled version from home on your work machine without
rebuilding it?

Does any of this information help?

Robin S.
Ts'i mahnu uterna ot twan ot geifur hingts uto.- Hide quoted text -

- Show quoted text -

Hello Robin,

I have Excel in my references.
When I build the solution I get the following:

Warning 1 There are updated custom wrappers available for the
following referenced components: Excel ,MSComctlLib ,OWC11 ,VBIDE.
 
Hello Robin,

I have Excel in my references.
When I build the solution I get the following:

Warning 1 There are updated custom wrappers available for the
following referenced components: Excel ,MSComctlLib ,OWC11 ,VBIDE.

It's a warning, though, not an error, right? I don't understand why it has
VBIDE in there, but the first two I can understand. I don't know what OWC11
is.

So what happens if you run it despite the error?

Robin S.
 
It's a warning, though, not an error, right? I don't understand why it has
VBIDE in there, but the first two I can understand. I don't know what OWC11
is.

So what happens if you run it despite the error?

Robin S.- Hide quoted text -

- Show quoted text -

It runs if I run it. the problem with this warning is that it's there.
I don't like to have warnings.
 
It runs if I run it. the problem with this warning is that it's there.
I don't like to have warnings.

Yeah, I know what you mean. But your only other option is to use the newest
version of Excel, and if your clients have a previous version, it won't
work for them. But hey, what do I know. You can always try it and see.
That's just been my experience.

Robin S.
 
Back
Top