matlabからエクセルを開いて閉じる
Show older comments
matlabで指定したエクセルを開きユーザーが入力後、保存して閉じるまでを行いたいです。
filename = 'C:\Users\Desktop\test.xlsm'
excelapp = actxserver('Excel.Application');
excelapp.Visible = 1;
wkbk = excelapp.Workbooks;
wdata = Open(wkbk,filename);
上記の方法で指定したエクセルを開くことはできましたが、閉じることができません。
流れとして、
matlabでエクセルを開く
matlabでダイアログを開く
ユーザーがエクセルを入力し、MATLABのダイアログでOKを押すと自動で保存し閉じるとしたいです。
宜しくお願いします。
2 Comments
MATLAB から Excel Spreadsheet にセル背景色やフォント色を指定してデータを書くにはどうしたらよいですか?https://jp.mathworks.com/matlabcentral/answers/95482-matlab-excel-spreadsheet
や
ActiveX を使用した Excel スプレッドシートへのデータの書き込みhttps://jp.mathworks.com/help/matlab/matlab_external/using-a-matlab-application-as-an-automation-client.html
が参考になるかも。
qrqr
on 24 Nov 2019
Accepted Answer
More Answers (0)
Categories
Find more on スプレッドシート in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!