Question for xll excel ?

DangDKhanh-2637 941 Reputation points
2021-08-19T09:49:38.42+00:00

Hi,
I'm using these codes from this post xlcall.cpp:

What I am doing is getting the address of 1 cell based on row and column position.
in the first run the function code works fine.
but in the next call, the result appeared cryptic characters.
I don't know what the reason is:
Objects are wrapped and free upon completion.

XLOPER12 k1; k1.xltype = xltypeNum; k1.val.num = (1 + xr.rwFirst);  
XLOPER12 k2; k2.xltype = xltypeNum; k2.val.num = (1 + xr.colFirst);  
LPXLOPER12 from[2]{ &k1,&k2 };  
XLOPER12 t;  
Excel12v(219, &t, 2, from);  
t.xltype |= xlbitXLFree;  

124629-image.png

Can someone tell me the cause?

Thanks you!

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,559 questions
0 comments No comments
{count} votes