Re: Adding reference of Excel COM won't work

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




<yevron2@xxxxxxxxx> wrote in message
news:1170236758.058987.115090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jan 31, 11:23 am, Eran.Ya...@xxxxxxxxx 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.



.



Relevant Pages

  • RE: EXCEL: Permission to wrkbk restrict:Inform. Rights Manag. config p
    ... an EXCELff hotfix sent to me by Microsoft. ... The EXCELop file would not ... install. ... When I attempt to open my EXCEL files with password protection on them I ...
    (microsoft.public.windowsxp.general)
  • Re: accidentaly removed office program from computer
    ... > Yesterday after a crash in excel, i was advised by microsoft to update my ... > office program, which I have not done, ever. ... > figured that i would cancel the install and work around my problems. ...
    (microsoft.public.office.misc)
  • Re: Excel Addin and PDF rendering
    ... We have an automation addin that exposes a UDF, ... registers/initializes the automation add-in. ... If we open the workbook manually in Excel, ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Excell and Word Hang up when attempting use Save As command
    ... there no direct Microsoft Support? ... It is Windows OS updates that did the deed. ... Gord Dibben MS Excel MVP ... Problems in Windows Explorer or the Windows shell after you install security ...
    (microsoft.public.excel)
  • Re: Add-in functions when starting Excel programmatically
    ... but in automation they don't get installed (which is ... why I checked Excel knew which were installed and then installed them). ... but I definitely needed to add the addin and install it. ... Installed property to False and reset it to True the add-ins seem to get ...
    (microsoft.public.excel.worksheet.functions)