View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.sdk,microsoft.public.dotnet.languages.csharp
Frank X Frank X is offline
external usenet poster
 
Posts: 3
Default C# Excel Automation Add-In

Excel 2002 introduced a capability to add custom worksheet functions to
Excel direct from a COM/ActiveX object.

I can use C# to develop a COM object which I can use fine from Excel/VBA,
however I can't see it using the Excel Tools/Add-Ins - Automation button.

Now this appears to be because it is not an *ActiveX* COM object, apparently
in order to be an ActiveX object the COM object needs to have a
'CLSID'/Programmable key entry in the registry.

I can add this Key myself in regedt32 and then the C# COM object works fine
as an Automation Add-in. But I'm sure this isn't the correct way to do it,
so is there a C#/.Net attribute or something to create the "Programmable"
registry key automatically?