xlfRegister fails in AddinExpress.MSO.ADXXLLModule.RegisterXlMethod

Add-in Express™ Support Service
That's what is more important than anything else

xlfRegister fails in AddinExpress.MSO.ADXXLLModule.RegisterXlMethod
if descriptions for parameters are to long a UDF is not registered in excel and an exception is thrown by AddinExpress.MSO.2005.dll 
Dirk




Posts: 73
Joined: 2017-10-05
Hello,

We have a function that is not registered. We receive this exception from excel:

Detailed technical information follows:
---
Date and Time: 30.10.2018 16:00:05
Machine Name: YYYZZZZ
IP Address: fe80::34ba:b9a5:9c41:9428%10
Current User: YYY\XXXX

Application Domain: C:\dev\repos\ExcelAddIn\XXXXXExcelAddIn\bin\Debug\
Assembly Codebase: file:///C:/WINDOWS/assembly/GAC_MSIL/AddinExpress.MSO.2005/8.7.4430.0__4416dd98f0861965/AddinExpress.MSO.2005.dll
Assembly Full Name: AddinExpress.MSO.2005, Version=8.7.4430.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 8.7.4430.0

Exception Source: AddinExpress.MSO.2005
Exception Type: System.ApplicationException
Exception Message: 'xlfRegister' failed. Function name: AB.FUNC
Exception Target Site: RegisterXlMethod

---- Stack Trace ----
AddinExpress.MSO.ADXXLLModule.RegisterXlMethod(mi As ADXExcelMethodInfo)
AddinExpress.MSO.2005.dll: N 0819 (0x333) IL

We assume that this exception is thrown because our parameter description is to long.
Is there a limit for parameter descriptions or names?
How should we deal with this exception? Can we handle this exception?
If we shorten the description text, no exception is thrown and the function is loaded correctly.

thanks
Dirk
Posted 30 Oct, 2018 10:07:46 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Dirk,

You should fix the root cause of this exception. I suppose the UDF declared contains unsupported parameter types. Note that the Excel API only accepts basic types: int, bool, string. If you need to pass something else to your function, use object type parameters.

Dirk Reu? writes:
Is there a limit for parameter descriptions or names?


Please check section My XLL Add-in Doesn't Show Descriptions, see the PDF file in the folder {Add-in Express}\Docs on your development PC or https://www.add-in-express.com/docs/net-excel-udf-tips.php#xll-no-descriptions. It contains two helper functions that you can use to calculate the length of parameter names and descriptions.


Andrei Smolin
Add-in Express Team Leader
Posted 31 Oct, 2018 05:57:05 Top