Must everything function start with a xll?

Jul 29, 2012 at 1:54 AM
Edited Jul 29, 2012 at 1:57 AM


I'm new to xll and I like it. but does every function end up as "xll".function when used in excel? I want to make different groups of function and want to change that, possible?

Also, when distributing the final add-in to other users, does it require any other dependencies?

One other thing, I made a super basic test to time xll Vs. basic COM (using ATL, referenced in VBA) and the COM version is slightly faster (very small diff) but I had thought xll would be faster, any thoughts? simple calc i used for the function:

 unsigned int start = clock();  
    double total = 1;
    for (int i = int(Num1); i < 1000000; i++)
    total = total - total / 4.0 + i % 100000 * 3.0;
    ReturnVal = clock()-start;



Jul 29, 2012 at 5:28 PM

You can name your functions anything you would like, within Excel's naming restrictions.

The xll's you build are self contained.

It is not surprising that compiled for loops run the same spreed in COM. You will see the speed up when passing large arrays of doubles using the FP data type vs VBA or COM. You can use BABY.HUEY in to do testing in Excel.

Jul 29, 2012 at 6:52 PM

thanks Keith, that's useful. Just one thing, how/where do I amend the "xll" operator part of the function that comes up in excel? I know how to edit the "function" part - which is the name of the method but where do I change the xll part? can't change the namespace, so where is it picking this up from?


Jul 29, 2012 at 8:06 PM

The third argument of xll::FunctionX specifies the text for the name that shows up in Excel. Is that what you are asking?

Jul 29, 2012 at 8:15 PM

found it, perfect thanks!