Hi Anthony,
The functions you expose from an Excel-DNA add-in can have any valid Excel name – this means you can have some extra characters like “.” or “?” in the name, which normally can’t be part of the method name in C# or VB.NET. You specify the name to register a method with using an attribute in your code if you want to override the default, which just uses the method name. It might look like this in C# or VB.NET respectively:
[ExcelFunction(Name="TimeDates.IsTime")]
public static bool IsTime()
{
…
}
<ExcelFunction(Name:= "TimeDates.IsTime")>
Public Shared Function IsTime() As Boolean
…
End Function
You can also specify the Excel function wizard category for your function:
[ExcelFunction(Name="TimeDates.IsTime", Category="Anthony’s Functions")]
How you arrange these functions inside your code is a separate issue to how they are registered with Excel.
So your functions can be in a various classes (or Modules in VB.NET) if that helps you to arrange them better, but that does not affect how they will be used in a formula.
They must just be public static (Public Shared) methods in a public class (or in a Public Module).
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/ea9f668f-fc65-4a52-ad33-b425ca84f771n%40googlegroups.com.