By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,226 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,226 IT Pros & Developers. It's quick & easy.

Adding reference of Excel COM won't work

P: n/a
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.

Jan 31 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Jan 31, 11:23 am, Eran.Ya...@gmail.com wrote:
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...)


Jan 31 '07 #2

P: n/a
On Jan 31, 11:45 am, yevr...@gmail.com wrote:
On Jan 31, 11:23 am, Eran.Ya...@gmail.com wrote:


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...)- Hide quoted text -

- Show quoted text -
thanks.
I'll check it.

Jan 31 '07 #3

P: n/a

<ye*****@gmail.comwrote in message
news:11**********************@a34g2000cwb.googlegr oups.com...
On Jan 31, 11:23 am, Eran.Ya...@gmail.com wrote:
>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...)
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.

Feb 1 '07 #4

P: n/a
On Feb 1, 11:44 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
<yevr...@gmail.comwrote in message

news:11**********************@a34g2000cwb.googlegr oups.com...


On Jan 31, 11:23 am, Eran.Ya...@gmail.com wrote:
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...)

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.

Feb 18 '07 #5

P: n/a

<Er********@gmail.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
On Feb 1, 11:44 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
><yevr...@gmail.comwrote in message

news:11**********************@a34g2000cwb.googleg roups.com...


On Jan 31, 11:23 am, Eran.Ya...@gmail.com wrote:
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...)

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.
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.
Feb 18 '07 #6

P: n/a
On Feb 18, 7:57 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
<Eran.Ya...@gmail.comwrote in message

news:11**********************@a75g2000cwd.googlegr oups.com...


On Feb 1, 11:44 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
<yevr...@gmail.comwrote in message
>news:11**********************@a34g2000cwb.googleg roups.com...
On Jan 31, 11:23 am,Eran.Ya...@gmail.com wrote:
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...)
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.

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.

Feb 19 '07 #7

P: n/a

<Er********@gmail.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
On Feb 18, 7:57 pm, "RobinS" <Rob...@NoSpam.yah.nonewrote:
><Eran.Ya...@gmail.comwrote in message

news:11**********************@a75g2000cwd.googleg roups.com...


On Feb 1, 11:44 am, "RobinS" <Rob...@NoSpam.yah.nonewrote:
<yevr...@gmail.comwrote in message
>>news:11**********************@a34g2000cwb.google groups.com...
On Jan 31, 11:23 am,Eran.Ya...@gmail.com wrote:
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...)
>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.

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.
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.
Feb 20 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.