+ Reply to Thread
Results 1 to 3 of 3

Excel v10 can't find function in C# .Net managed Automation add-in

Hybrid View

Guest Excel v10 can't find function... 05-26-2006, 09:15 PM
Guest RE: Excel v10 can't find... 05-27-2006, 12:35 AM
Guest RE: Excel v10 can't find... 05-27-2006, 02:45 AM
  1. #1
    Andrew
    Guest

    Excel v10 can't find function in C# .Net managed Automation add-in

    When deploying a managed automation add-in to another machine (local file
    system install and registration of add-in), Excel v10 (aka XP) will find the
    registerd add-in (tools->addins->automation) but the function will not appear
    in the function list and of course #NAME? results if try to use in the
    spreadhseet.

    The add-in works fine on machines with office v11 installed, and also works
    fine for Excel v10 on a machine with both office 2003, Office XP and vs2005
    installed. (The function name appears in Insert Function list as expected).

    Even a simplified test program (no interfaces other than autodual) has this
    problem
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Runtime.InteropServices;
    using Microsoft.Win32;
    namespace testfunc1
    {
    [ClassInterface(ClassInterfaceType.AutoDual)]
    public class functions
    {
    public Double AJTE(Double a,Double b)
    {
    return (a+b);
    }
    [ComRegisterFunctionAttribute]
    public static void RegisterFunction(System.Type t)
    {
    Microsoft.Win32.Registry.ClassesRoot.CreateSubKey
    ("CLSID\\{" + t.GUID.ToString().ToUpper() +
    "}\\Programmable");
    }

    [ComUnregisterFunctionAttribute]
    public static void UnregisterFunction(System.Type t)
    {
    Registry.ClassesRoot.DeleteSubKey
    ("CLSID\\{" + t.GUID.ToString().ToUpper() +
    "}\\Programmable");
    }
    }
    }

    I am using win xp pro, vs2005, .Net Framework 2.x and all updates to all
    products in place.

    And here I was thinking I was ready to let it loose on clients....Any
    thoughts on what is going on?

    Jeltz.

  2. #2
    Andrew
    Guest

    RE: Excel v10 can't find function in C# .Net managed Automation add-in

    OK a bit more to this.

    Install Excel v10 with all updates...add-in does not work

    Install Excel 11 without updates (keeping Excel 10 as well )...add-in does
    not work

    Install Excel11 SP2 and updates....addin works in both Excel10 and Excel 11
    addins

    at a guess it is an updated dll I need ...(But which one(s)?) am tracking
    further...

    At least I have discounted the need to install VS2005 to make it work.
    Jeltz


    "Andrew" wrote:

    > When deploying a managed automation add-in to another machine (local file
    > system install and registration of add-in), Excel v10 (aka XP) will find the
    > registerd add-in (tools->addins->automation) but the function will not appear
    > in the function list and of course #NAME? results if try to use in the
    > spreadhseet.
    >
    > The add-in works fine on machines with office v11 installed, and also works
    > fine for Excel v10 on a machine with both office 2003, Office XP and vs2005
    > installed. (The function name appears in Insert Function list as expected).
    >
    > Even a simplified test program (no interfaces other than autodual) has this
    > problem
    > using System;
    > using System.Collections.Generic;
    > using System.Text;
    > using System.Runtime.InteropServices;
    > using Microsoft.Win32;
    > namespace testfunc1
    > {
    > [ClassInterface(ClassInterfaceType.AutoDual)]
    > public class functions
    > {
    > public Double AJTE(Double a,Double b)
    > {
    > return (a+b);
    > }
    > [ComRegisterFunctionAttribute]
    > public static void RegisterFunction(System.Type t)
    > {
    > Microsoft.Win32.Registry.ClassesRoot.CreateSubKey
    > ("CLSID\\{" + t.GUID.ToString().ToUpper() +
    > "}\\Programmable");
    > }
    >
    > [ComUnregisterFunctionAttribute]
    > public static void UnregisterFunction(System.Type t)
    > {
    > Registry.ClassesRoot.DeleteSubKey
    > ("CLSID\\{" + t.GUID.ToString().ToUpper() +
    > "}\\Programmable");
    > }
    > }
    > }
    >
    > I am using win xp pro, vs2005, .Net Framework 2.x and all updates to all
    > products in place.
    >
    > And here I was thinking I was ready to let it loose on clients....Any
    > thoughts on what is going on?
    >
    > Jeltz.


  3. #3
    Andrew
    Guest

    RE: Excel v10 can't find function in C# .Net managed Automation add-in

    OK I found the answer myself. Microsoft have a patch solution posted back in
    december that works for Office XP, but has not been included in the office xp
    update.
    http://support.microsoft.com/kb/908002/en-us

    I think the latest updates to office 2003 include it already so it is only
    needed for office XP only users using .net framework 2.0 add-ins.

    Well it works for me anyway...what a pity clickonce deploy packages
    pre-requisite as a setup.exe and .msi which i don;t allow to download from my
    site (which was the whole point of choosing the .deploy/manifest solution
    check box in the click once options anyway..GO FIGURE.)
    Jeltz




    "Andrew" wrote:

    > When deploying a managed automation add-in to another machine (local file
    > system install and registration of add-in), Excel v10 (aka XP) will find the
    > registerd add-in (tools->addins->automation) but the function will not appear
    > in the function list and of course #NAME? results if try to use in the
    > spreadhseet.
    >
    > The add-in works fine on machines with office v11 installed, and also works
    > fine for Excel v10 on a machine with both office 2003, Office XP and vs2005
    > installed. (The function name appears in Insert Function list as expected).
    >
    > Even a simplified test program (no interfaces other than autodual) has this
    > problem
    > using System;
    > using System.Collections.Generic;
    > using System.Text;
    > using System.Runtime.InteropServices;
    > using Microsoft.Win32;
    > namespace testfunc1
    > {
    > [ClassInterface(ClassInterfaceType.AutoDual)]
    > public class functions
    > {
    > public Double AJTE(Double a,Double b)
    > {
    > return (a+b);
    > }
    > [ComRegisterFunctionAttribute]
    > public static void RegisterFunction(System.Type t)
    > {
    > Microsoft.Win32.Registry.ClassesRoot.CreateSubKey
    > ("CLSID\\{" + t.GUID.ToString().ToUpper() +
    > "}\\Programmable");
    > }
    >
    > [ComUnregisterFunctionAttribute]
    > public static void UnregisterFunction(System.Type t)
    > {
    > Registry.ClassesRoot.DeleteSubKey
    > ("CLSID\\{" + t.GUID.ToString().ToUpper() +
    > "}\\Programmable");
    > }
    > }
    > }
    >
    > I am using win xp pro, vs2005, .Net Framework 2.x and all updates to all
    > products in place.
    >
    > And here I was thinking I was ready to let it loose on clients....Any
    > thoughts on what is going on?
    >
    > Jeltz.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1