views:

1483

answers:

4

I have been searching on the web for some example code on how we can write a custom ActiveX Control for use in Excel using .NET but so far I have found old articles suggesting that it is not supported.

The application we are building uses Excel as a report writer so we which to add some custom controls to the worksheets to provide a richer experience. From the research I have done so far it appears that some ActiveX Controls can only be hosted in IE and hence I need to ensure that any approach taken works with Excel as a host.

The link http://www.codeproject.com/KB/miscctrl/exposingdotnetcontrols.aspx mentions the following:

CAVEAT: As this support has been dropped from Beta2 of .NET, don't blame me if it fries your PC or toasts the cat.

Can anybody give me an indication if it is possible using .NET 1.1 and if so to any pointers on best practices?

Thanks

David

A: 

Why particularly for using in Excel? And how will that differentiate the development of activex control?

Could you also link where it says "not supported"?

Prakash
A: 

I would thought that you're out of luck, but did find this:

http://dotnetslackers.com/articles/csharp/WritingAnActiveXControlInCSharp.aspx

Gives me the willies... but it might just right for you.

rp
A: 

Further information on creating ActiveX Controls using C# can be found below although these articles seem to use IE as a Hosting Container not Excel.

http://www.ondotnet.com/pub/a/dotnet/2003/01/20/winformshosting.html

http://www.codeproject.com/KB/miscctrl/exposingdotnetcontrols.aspx

djsnowsill
+2  A: 

Andrew Whitechapel writes about managed controls as ActiveX controls in Office documents. You can read his article here:

Using Managed Controls as ActiveX Controls

0xA3