multithreading - Excel function coded in c++ with the excel sdk : I want it NOT to trigger calculation when used in excel's function wizard -



multithreading - Excel function coded in c++ with the excel sdk : I want it NOT to trigger calculation when used in excel's function wizard -

i using excel c/c++ sdk >= 2007 (i set link 2007 reference) , excel >= 2007. i coded (with sdk) xll providing excel function f, , function f can called in 2 ways in excel sheet : 1) write straight formula involving f in excel cell/range of cell or in formula bar 2) write =f in excel cell, , click on fx icon on left of formula bar , utilize excel's function wizard.

only 2nd case interests me. in case, opens dialog box of excel's function wizard : windows n cells, each corresponding 1 argument of f (assuming f function taking n argumebts). now, default, has come in in 1 of cells, excel trigger recalculation of function.

this particularly handy when don't know function , want "discover it", because can see if type represents right argument f etc, instance errors appears etc.

but if f relies on intensive numerical routine (in c++), recalculations take way long time, , freezing wizard. (because each time cell in dialog box modified, recalculation triggerde.)

therefore next : deactivate somehow recalculation when function "called" through function wizard. let's low quality solution.

ideally, next : autorize recalculations triggered, ensure (in c++ excel sdk code) done in different "thread" 1 in wizard called. there wouldn't freezing anymore. (so handy part of wizard preserved.) apparently, if understand this msdn article correctly (maybe not, in case not same problem) not possible under excel 2007 in excel >= 2010.

as users of f using various version of excel -- 2007 2003 of them -- if tempted force move 2010 (come on, after 2013 in real life !), won't it, mentionned reason, because not satisfying me have working excel versions...

so find solution. heard people talking rtd this, not sure.

that's why insights welcome ! thx lot in advance. (and sorry lenght of question.)

see msdn article discusses method used, c++ examples method used frameworks such xldna , xll plus (and think addin express).

i don't think using asynchronous udf signature help because function wizard uses evaluate method under covers rather actual re-calculation (but have not actulally tried it)

c++ multithreading excel xll

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -