472,955 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,955 software developers and data experts.

Adding reference of Excel COM won't work

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
7 11143
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
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

<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
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

<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
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

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Whoever | last post by:
To create Excel file, you can Add Reference Visual Studio.NET, browse to ... and then select Microsoft.Office.Interop.Excel, etc. It endsup some reference to GUID in project file. You can then...
3
by: Nick Douglas | last post by:
Hello, I'd like to programmatically reference the Excel Object Library from an Access form using VB. I am using this code: Application.VBE.vbprojects("VBAProject").References.AddFromFile...
6
by: Jeti [work] | last post by:
I have Office2003 installed, and trying to read excel file from C#. I made ExcelWrapper class, and it worked fine until new version of offide came! Now, when i'm trying to open workbook, i get an...
1
by: Steve B. | last post by:
Why does Office create a compile error when doing a Release compile but not when doing a Debug complie. Release compile is compiled to the network share drive - Excel Interop is added as a...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
1
by: gmurnag | last post by:
Hello I work on a database that needs to work on French and English version of Windows and Office - and work on computers with any combination of Windows 2000, Windows XP, Office 2000, Office XP,...
4
by: Looch | last post by:
Thanks in advance for any help. I'm having trouble with this code: Dim xlsApp As Excel.Application Dim xlsWB As Excel.Workbook xlsApp = New Excel.Application xlsApp.Visible = True ...... ...
1
by: diego | last post by:
I have the follwing problem. I want to add a reference to an COM- object ("ek1.exe"). In Excel-VBA it works without any problems. In MS Visual Studio 2005 VB this doesn't work and I get the...
1
by: rishiyo | last post by:
Good ones!! I want to retrieve and add datas with excel. I've tried one by adding two textboxes and two command buttons. THE code is: 'do declare these variables you need to add a reference'to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

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.