MATLAB から COM Automation Server として起動されたExcelにてアドインのマクロを使用することはできますか?
이전 댓글 표시
MATLAB から COM Automation Server としてExcel を起動しました。つぎにこのExcelから自分のExcel アドインのマクロを使用させようとするとエラーとなります。
コード:
Excel = actxserver('Excel.Application');
Workbooks = get(Excel,'Workbooks');
fWorkbook = invoke(Workbooks,'Add');
fWorksheet = get(fWorkbook,'Activesheet');
fRange = fWorksheet.Range('A1:B2');
fRange.Value{1,1} = 'name';
fRange.Value{2,1} = 'foo';
fRange.Value{1,2} = 'amount';
fRange.Value{2,2} = 100;
Excel.Run('myMacro');
エラー:
ERROR: % ??? Invoke Error, Dispatch Exception:
% Source: Microsoft Office Excel
% Description: The macro 'myMacro' cannot be found.
% Help File: D:\Applications\MSOffice\OFFICE11\1033\xlmain11.chm
% Help Context ID: 0
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB の COM オブジェクト에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!