Hi,
My requirement is to develop a C++ XLL function(preferrably) or a macro which is able to BOTH read from & write to any cells during its execution.
The problem I am facing is,
for macro I am able to ONLY write,
for function I am ONLY able to read(by taking them as parameters).
Can't I use "xlfgetcell" in a macro? if yes how?
I am trying to read an array, but getting junk data.
QFXM_XDATATYPE lxCellLoc;
QFXM_XDATATYPE xRes;
QFXM_XDATATYPE txInData;
Excel4(xlfCaller, &xRes, 0);
// I am not using xlfCaller, since it will not let me access any cell????
lxCellLoc.xltype=xltypeSRef;
lxCellLoc.val.sref.count = 2;
lxCellLoc.val.sref.ref.rwFirst = 0;
lxCellLoc.val.sref.ref.rwLast = 1;
lxCellLoc.val.sref.ref.colFirst = 0;
lxCellLoc.val.sref.ref.colLast = 0;
int x = Excel(xlfGetCell,&txInData,2,(LPXLOPER)&lxCellLoc, TempInt(xltypeNum));
Thanks in advance,
Geoff.