G
Guest
I've created an excel Automation Add-in that exposes some functions in an
Excel spreadsheet. I have a setup project for this, but it does not seem to
register the classes correctly.
How do I create a setup project to install an Excel Addin?
My project is in C#,
namespace Myplugin
{
[ClassInterface(ClassInterfaceType.AutoDual), ComVisible(true)]
public class MyClass
{
// members
// exposed function
public decimal last(string symbol, string region)
{
}
[ComRegisterFunctionAttribute]
public static void RegisterFunction(Type type)
{
Registry.ClassesRoot.CreateSubKey(GetSubKeyName(type));
}
[ComUnregisterFunctionAttribute]
public static void UnregisterFunction(Type type)
{
Registry.ClassesRoot.DeleteSubKey(GetSubKeyName(type), false);
}
private static string GetSubKeyName(Type type)
{
string s = @"CLSID\{" + type.GUID.ToString().ToUpper() +
@"}\Programmable";
return s;
}
Excel spreadsheet. I have a setup project for this, but it does not seem to
register the classes correctly.
How do I create a setup project to install an Excel Addin?
My project is in C#,
namespace Myplugin
{
[ClassInterface(ClassInterfaceType.AutoDual), ComVisible(true)]
public class MyClass
{
// members
// exposed function
public decimal last(string symbol, string region)
{
}
[ComRegisterFunctionAttribute]
public static void RegisterFunction(Type type)
{
Registry.ClassesRoot.CreateSubKey(GetSubKeyName(type));
}
[ComUnregisterFunctionAttribute]
public static void UnregisterFunction(Type type)
{
Registry.ClassesRoot.DeleteSubKey(GetSubKeyName(type), false);
}
private static string GetSubKeyName(Type type)
{
string s = @"CLSID\{" + type.GUID.ToString().ToUpper() +
@"}\Programmable";
return s;
}