登录论坛

查看完整版本 : [原创][讨论]警告!还在用DDE的同志停手吧!(关于excel接口的讨论,请用过的进来,谢谢!)


binro
2009-01-13, 20:30
老板让做MATLAB的EXCEL的接口,最开始找到的就是EXCEL LINK。可是这个不能满足动态性。于是选择DDE,DDE的上手很简单,调用函数ddeinit, ddepoke都是ok的。可到了动态链接ddeadv,怎么也不行,查了整整半天的资料,一个老外也问同样的问题
I am facing problem in using ddeadv(function responsible
for hot link between dde server and client) in newer
version of matlab R2007a/b. Although I can init the
communication, request and poke value to dde server but
only ddeadv is not working. Please help me out.

Sample code:
channel=ddeinit('excel','m.xls'); working
a=ddepoke(channel,'r1c1',5); working
b=ddereq(channel,'r1c1'); working
d=ddereq(channel,'r1c1','disp(x)','x') NOT WORKING;

althout I am getting d=1 for that syntex but callback is
not working, means when I change the value in the m.xls
r1c1 the disp(x) function is not called .

没有人回答,原因只是用了7.1以上的版本!
同业的代码,同样用excel在6.5上就可以!!
有点无语了。浪费了一天的时间:cry:

最好大家讨论下其他的方法,要满足数据交换的动态性。既EXCEL改变一个数,在MATLAB中要相应的改变。谢谢大家!