Might be helpful to add one more template besides xll.function

Oct 21, 2012 at 8:42 PM

Hi Keith,

The current xll.funciton accept one argument. It would be much helpful to have another template which accept a series of cells to perform summation, standard deviation, ...

I am sure it is covered somewhere in the source code download. But would like to see it without going too deep:)

Oct 21, 2012 at 8:47 PM

When I move to Visual C++ 2012 I intend to include Code Snippets. That should be even more helpful than sample code. Too bad they are not supported in VC++ 2010.

See the Related Projects on the home page for more examples on how to use the library.

Sounds like you need the FP data type: http://xll.codeplex.com/wikipage?title=FP.

Oct 21, 2012 at 10:01 PM

Got summation working! Thanks!

// series cells argument function 2


AddIn xai_array_sum( "?xll_array_sum" , XLL_FP XLL_FP, "ARRAY.SUM", "Array" , "STL", "Summation of an array.");





 static xll::FP aa,bb; double *aa_array = aa.array(); double *bb_array = bb.array();



for(int i=0; i<aa.size(); ++i) bb_array[0] += aa_array[i];



return bb.get();




// end of series cells argument function 2

aa = *pa;


bb_array[0] = 0.0; 

_FP* WINAPI xll_array_sum(

const _FP* pa) {