jeudi 18 septembre 2014

XLL get input with array


Vote count:

0




I'm working on a simple XLL addin and trying to get the input with a regular double* (not FP or OPER) because from what I understand, Excel should work with regular C data types. I can't get it to work, I get There is a problem with the number used in the formula. What am I doing wrong?\



static AddIn xai_array_try(
"?xll_array_try", XLL_FP XLL_FP,
"ARRAY.TRY", "Array",
"STL", "Test Sum Array."
);

double WINAPI xll_array_try(const double *arr) {
#pragma XLLEXPORT

int i;
double sum = 0;

int size = sizeof(arr)/sizeof(double);

for (i = 0; i < size; ++i) {
sum += arr[i];
}

return sum;
}


asked 1 min ago







XLL get input with array

Aucun commentaire:

Enregistrer un commentaire