|
|
is i,j,channel:integer;
. H) T9 i8 E! Ddo/ u# Y$ ~) N7 g
1 t6 t- S8 l+ G- t# N; ]channel:=ddeconnect("excel","sheet1");--顯示連線,第一格代表連線到excel文件上,第二格代表連到sheet1這個活頁夾
, r3 W( o {4 r' W1 T. E
2 ]2 c; u; f/ Cfor i:=1 to 列的最大數 loop' O" A+ D! K0 W$ L6 g
+ T! ?$ Z" w3 [8 O for j:=1 to 欄的最大數 loop
* h, |# @' U" d7 S" ~3 a- W7 ~% H ddepoke(channel,"r"+to_str(i)+"c"+to_str(j),to_str(tablefile[j,i]),1000);--第一個代表將資料送到channel裡(用ddeconnect連線)第二個"r"代表列,+to_str(j)是指從第j列開始+"c"代表欄,+to_str(i)是表示第i欄,to_str(tablefile[j,i]指的是從tablefile第j欄第i列的資料傳送到channel裡,1000代表每毫秒的暫停時間不用管設1000即可,)
% R/ z) _2 @ Y% A8 m next;/ S1 l/ b5 F- N# L/ E3 D% x
next;$ g6 I! ~- @& k$ f
end;7 ~" S$ C! T3 K
$ p. V1 I: w/ b, [[ 本帖最后由 fans0390 于 2008-8-26 20:42 编辑 ] |
评分
-
查看全部评分
|