I tried the solution posted here to try to resize dynamically excel cells. It works fine with this code : but when i try the asyncrohous method, this throw an exeption not handled : And here is the line in the Reizer class that throw it: |
Hi Dany,
Array functions and the async support don’t work together well, and with the resizer is not expected to work at all.
The Excel RTD functionality that Excel-DNA uses to implement the async functions is not really supported for array functions, and when called with array results works in ways that are not expected by the resizer.
The recommended workaround is to split your function into two parts:
It’s a bit more inconvenient for the users, as the have to deal with the two functions and the extra cell, but at least it will be reliable.
For a full example of this pattern, with some helpers code, see the ACQ add-in by Alex Chirokov here: https://github.com/ratesquant/ACQ
And find the detailed write-up which also discusses this handle pattern here: https://www.codeproject.com/Articles/1097174/Interpolation-in-Excel-using-Excel-DNA
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.