Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
In VS 2005 and Excel 2003. I am writing an Automation Add-In in C# and don't
want to expose the Object methods (GetHashCode, GetType etc.) to end users to put in their cell formulas. A post here http://groups.google.com/group/micro...6a59ead000e62? suggests marking the class as ClassInterfaceType.None and implementing a public interface with just the desired methods but this does not work (maybe it worked in .NET 1.1). Help? |
#2
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matthew,
Check that the public interface is marked as ComInterfaceType.InterfaceIsDual or at least ComInterfaceType.InterfaceIsDispatch (with the [InterfaceType] attribute). -- Regards, Dmytro Lapshyn [MVP] http://blogs.vbcity.com/DmytroL "Matthew Wieder" wrote in message ... In VS 2005 and Excel 2003. I am writing an Automation Add-In in C# and don't want to expose the Object methods (GetHashCode, GetType etc.) to end users to put in their cell formulas. A post he http://groups.google.com/group/micro...6a59ead000e62? suggests marking the class as ClassInterfaceType.None and implementing a public interface with just the desired methods but this does not work (maybe it worked in .NET 1.1). Help? |
#3
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
The interface is set to dual - the functions still do not show up in the
Insert Function dialog in Excel. Does anyone have this working in .NET 2.0? Dmytro Lapshyn [MVP] wrote: Hi Matthew, Check that the public interface is marked as ComInterfaceType.InterfaceIsDual or at least ComInterfaceType.InterfaceIsDispatch (with the [InterfaceType] attribute). |
#4
![]()
Posted to microsoft.public.dotnet.framework.interop,microsoft.public.excel.programming
|
|||
|
|||
![]()
Solved it - Based on web examples, I had been implementing my class as:
public class myClass : Object, MyInterface, Extensibility.IDTExtensibility2 which makes the primary interface the object type and that was causing the problems. Changed to: public class myClass : MyInterface, Extensibility.IDTExtensibility2 and only the desired methods are showing in Excel now. thanks. Matthew Wieder wrote: The interface is set to dual - the functions still do not show up in the Insert Function dialog in Excel. Does anyone have this working in .NET 2.0? Dmytro Lapshyn [MVP] wrote: Hi Matthew, Check that the public interface is marked as ComInterfaceType.InterfaceIsDual or at least ComInterfaceType.InterfaceIsDispatch (with the [InterfaceType] attribute). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Leveling Methods | Excel Worksheet Functions | |||
Automation Classes / Methods, overview or list | Excel Discussion (Misc queries) | |||
Std.Dev.methods NOT WORKING | Charts and Charting in Excel | |||
Search Methods | Excel Programming | |||
Certain methods do not work | Excel Programming |