[問題] 如何Get handle to the open Excel已回收
在網路上找到了以下的code
但是不曉得為什麼在執行第一行的時候
就發生了Undefined command/function 'actxGetRunningServer'.
我找了一下發現的確沒有這個function不過網路上好像有很多人在使用
不知道是否要加裝甚麼toolkit才可以enable
希望有人可以指點!!
% Get handle to the open Excel
h = actxGetRunningServer('Excel.Application');
% Get workbook handle
% You can select a differnt item number here or you can use
% workbook name
myBook = h.Workbooks.Item(1);
% Get sheet handle (the same comments as above apply)
mySheet = myBook.Item(1);
% Now assign matrix to a range
a = rand(5);
mySheet.Range('A1:E5').Value = a;
--
. . ★ .‧
. ‧ ‧ . ◤◥ . ‧ .
‧ . ◤**◥ . ‧ .
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 160.39.57.60
推
03/25 23:16, , 1F
03/25 23:16, 1F
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章