查看单个帖子
旧 2009-01-13, 20:30   #1
binro
初级会员
 
注册日期: 2008-03-02
年龄: 39
帖子: 2
声望力: 0
binro 正向着好的方向发展
难过 [原创][讨论]警告!还在用DDE的同志停手吧!(关于excel接口的讨论,请用过的进来,谢谢!)

老板让做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中要相应的改变。谢谢大家!
binro 当前离线   回复时引用此帖