XLL UDFs - Function and Parameter Descriptors

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

XLL UDFs - Function and Parameter Descriptors
Do they influence performance? 
Henri Pellemans




Posts: 104
Joined: 2010-05-06
Hi at ADX,

I have a XLL UDF with 292 functions and 1,084 parameters. The code is VB.NET

If I am going to implement function and parameter descriptors for all these functions and parameters, does it have any influence on the performance [i.e. speed of calculation] of these functions?

Best regards,

Henri
Posted 24 Jul, 2012 09:02:15 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Henri,

The function descriptors will be used by Excel as hints when you specify values passed the function. However, the IsVolatile property may cause additional recalculation. The "Developer's Guide" document (see adxnet.pdf file in the Add-in Express installation folder) has the following description:

IsVolatile = True means that your function will be recalculated whenever calculation occurs in any cell ( s) of the worksheet; a nonvolatile function is recalculated only when the input variables change
.NET, Extended MAPI, Windows Phone & RT
Posted 24 Jul, 2012 09:36:32 Top
Henri Pellemans




Posts: 104
Joined: 2010-05-06
Hi Eugene,

I suppose the descriptors do not make a function Volatile?

I know you can set a function to volatile in the designer. But if I am going to describe 292 functions, I won't use the designer, but use my own code, that I paste into the add-in module.

If I do so, must I explicitly declare the function as non volatile? Or is 'IsVolatile = FALSE' the default value, just as 'AcceptAsArray = TRUE' is the default value for the parameter descriptor.

Henri
Posted 24 Jul, 2012 10:32:47 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Henri,

Please note that the ADXExcelFunctionDescriptor class provides the IsVolatile property. Here is how the IsVolatile property is declared in the code:

[DefaultValue(false)]
public bool IsVolatile { get; set; }


And the AcceptAsArray property of the ADXExcelParameterDescriptor class is declared in the following way:

[DefaultValue(true)]      
public bool AcceptAsArray { get; set; }
.NET, Extended MAPI, Windows Phone & RT
Posted 24 Jul, 2012 11:37:46 Top
Henri Pellemans




Posts: 104
Joined: 2010-05-06
Hello Eugene,

So because of the default values the following code is not needed:



Me.AdxExcelFunctionDescriptor1.IsHidden = False

Me.AdxExcelFunctionDescriptor1.IsVolatile = False

Me.AdxExcelFunctionDescriptor1.IsThreadSafe = False

Me.AdxExcelParameterDescriptor1.AcceptAsArray = True



Unless I want to change the default values.

There will be enough lines of code. My 'ADX function description program for VB.NET' already generates about 7,000 lines of code...
Posted 24 Jul, 2012 12:15:57 Top
Eugene Astafiev


Add-in Express team


Posts: 8540
Joined: 2007-07-25
Hi Henri,

You are right. There is no need to configure these properties unless you want to set non-default values.
.NET, Extended MAPI, Windows Phone & RT
Posted 24 Jul, 2012 12:21:19 Top