Microsoft.Office.Interop.Excel on server

  • Good day,

    I got the srcipt working on my Local PC.

    But when importing on to server, i get the error.

    "Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

    I copied the files & registered to all locations i have on my local PC.

    But the the server does not have the Visual Studio .NET Command Prompt - not sure if it is needed as I use the register.bat

    Regards

  • Does the server have Excel installed?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Excel 2003 only installed on server

  • Version 10 is Excel 2002, I think. Is that what you have on your PC? You need to get these versions in order ...

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Hi, Really gratefull for the help - i need to get this working.

    I did not expect to get hassles as it worked fine on my local PC.

    It is the same version on both Local & Server

    Excel 2003 on both Local & Server

    ?

    i know previoulsy i ran the register.bat & done the vs prompt tool to run the register.

    but the server does not have that

    ?

  • But version 10, as referred to in your error message, is Excel 2002 (see here).

    At what point is the error message appearing? Is it when you try to run the package, or earlier in the process?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • I just ran the package on my local pc & works

    Using Microsoft Office Excel 2003 (both)

    Error only when executing the script task.

    I'm really puzzled 🙁

  • What does the Script Task do?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Opens an Excel file, executes a macro

  • Any ideas??

  • Not really. Still seems like a versioning issue to me. Did you have to register that DLL on your local PC, or was it just 'there' as a result of installing Excel?

    What is the code snippet from your script that generates the error? Can you open the package in BIDS on the server & re-do that bit of your dev?

    What is the code inside Register.bat?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Dll location & reference in script task: C:\WINDOWS\microsoft.net\Framework\v2.0.50727

    Register.bat code:

    echo off

    echo Microsoft Office XP Primary Interop Assemblies Registration Utility

    echo Copyright (c) 2002 Microsoft(R) Corporation. All rights reserved.

    echo Note: This utility must be run from the Visual Studio .NET Command Prompt. It will not function properly otherwise.

    echo Start adding primary interop assemblies to the global assembly cache.

    echo on

    gacutil -i Microsoft.Office.Interop.Access.dll

    gacutil -i adodb.dll

    gacutil -i dao.dll

    gacutil -i Microsoft.Office.Interop.Excel.dll

    gacutil -i Microsoft.Office.Interop.FrontPage.dll

    gacutil -i Microsoft.Office.Interop.FrontPageEditor.dll

    gacutil -i Microsoft.Office.Interop.Graph.dll

    gacutil -i Microsoft.Office.Interop.Visio.dll

    gacutil -i mscomctl.dll

    gacutil -i msdatasrc.dll

    gacutil -i Microsoft.Office.Interop.SmartTag.dll

    gacutil -i office.dll

    gacutil -i Microsoft.Office.Interop.Outlook.dll

    gacutil -i Microsoft.Office.Interop.OutlookViewCtl.dll

    gacutil -i Microsoft.Office.Interop.Owc.dll

    gacutil -i Microsoft.Office.Interop.PowerPoint.dll

    gacutil -i Microsoft.Office.Interop.Publisher.dll

    gacutil -i stdole.dll

    gacutil -i Microsoft.Vbe.Interop.dll

    gacutil -i Microsoft.Office.Interop.Word.dll

    echo off

    echo End adding assemblies to the global assembly cache.

    echo Start adding registry entries for each primary interop assembly.

    echo on

    regedit /s Microsoft.Office.Interop.Access.dll.reg

    regedit /s adodb.dll.reg

    regedit /s dao.dll.reg

    regedit /s Microsoft.Office.Interop.Excel.dll.reg

    regedit /s Microsoft.Office.Interop.FrontPage.dll.reg

    regedit /s Microsoft.Office.Interop.FrontPageEditor.dll.reg

    regedit /s Microsoft.Office.Interop.Graph.dll.reg

    regedit /s Microsoft.Office.Interop.Visio.dll.reg

    regedit /s mscomctl.dll.reg

    regedit /s msdatasrc.dll.reg

    regedit /s Microsoft.Office.Interop.SmartTag.dll.reg

    regedit /s office.dll.reg

    regedit /s Microsoft.Office.Interop.Outlook.dll.reg

    regedit /s Microsoft.Office.Interop.OutlookViewCtl.dll.reg

    regedit /s Microsoft.Office.Interop.Owc.dll.reg

    regedit /s Microsoft.Office.Interop.PowerPoint.dll.reg

    regedit /s Microsoft.Office.Interop.Publisher.dll.reg

    regedit /s stdole.dll.reg

    regedit /s Microsoft.Vbe.Interop.dll.reg

    regedit /s Microsoft.Office.Interop.Word.dll.reg

    echo off

    echo End adding registry entries for each primary interop assembly.

    echo Operation complete.

    echo on

    I have feeling & looked in my VSStudio installed software

    on the PC i have VS2005 Application Tools

    but on server BIDS i one SSIS,SSRS,SSAS

    I think the Dll must be registered using the Visual Studio.Net command Prompt.

    I also looked (control panel - admin - .net2) PC

    Then i can see all the dll registered. different version etc

    But on the server i see only the excel dll old version registered.

    How do i only get the Visual Studio Tool command prompt installed only?

    I don't know - running out of ideas????

    Please help

  • This is really not my area of expertise, but I think that you'll have no problems with the availability of regedit and that gacutil would be installed as part of the .NET Framework - which I presume is installed on the server?

    Sorry I'm not more help.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • THANK YOU - Appreciate all you effort & time.

    Perhaps.... (i know i'm pushing it - just stressing)

    I read that I need to install the

    "The vsvarsall.bat file will be installed if C++ is included in the installation.

    Run setup and select add/remove features.

    Make sure C# is checked in the list of parts to install.

    If you are not going to use C# then all the components under C# can be unchecked, only the top C# component is needed."

    I do have Visual Studio C# installed on PC & not on server as server only has the BIDS (SSIS,SSRS,SSAS)

    Do you know where I can find only the C# 2005 components to install on the server

    🙁

  • Hi

    Just in case you are still searching for answers, contact me. I just found it. It might help you.

    Thanks

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic. Login to reply