473,386 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 11171
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.