From: malayhk on
i tried a lot to pass array to excel sheet using xloper structure hear is
sample function i wrote to pass array using xloper

__declspec(dllexport) LPXLOPER xarr ()
{

static XLOPER xlArray;
XLOPER xlValues[4];
int i;
for (i = 0; i < 4; ++i)
{
carr[i]=i*2;
xlValues[i].val.num = i+10;
xlValues[i].xltype = xltypeNum;
}
//this will generate array with 4 element 10,11,12,13

xlArray.xltype = xltypeMulti;
xlArray.val.array.lparray = &xlValues;
xlArray.val.array.rows = 1;
xlArray.val.array.columns = 4;
return (LPXLOPER) &xlArray;
}

above function gives only first value of array i.e.10 in the cell from which
function call is made
is there is any way to fill the other cell? as i am giving no of row and
column in xloper it should fill 4 cell but that is not happening


 | 
Pages: 1
Prev: Bottom value in a list
Next: sumproduct i think