Closed troldal closed 1 year ago
Hi @troldal, The xll::Excel
function does not take a count and pointers to XLOPERs. xll::Excel(xlFree, value)
should be equivalent to ::Excel(xlFree, nullptr, 1, &value)
.
You shouldn't need to call this anyway. The xll::Excel
function sets xlbitXLFree
in the OPER returned and ~OPER takes care of that for you.
Hi,
First, thanks for your great work. I have read the book by Steve Dalton on this subject, and your library is definitely much easier to use.
Now, according to Steve Daltons book, when Excel allocates memory for the XLOPER object being handed over to the xll (happens for xltypeStr, xltypeRef and xltypeMulti), the xlFree function should be called in order for Excel to deallocate the memory again, like so:
The nullptr is there because this function does not have a return value. However, the
Excel
function will not accept this, with the error:For this to work, I need to call the C interface directly, located in the global namespace:
It's not a big deal, but it would be more elegant if the xll function could be used instead.