How do I run a matlab script automatically from an excel input?

21 ビュー (過去 30 日間)
Yu Li
Yu Li 2017 年 8 月 23 日
回答済み: Jan 2017 年 8 月 24 日
Hello, I'm just wondering if there is a way to do a automatically run for a matlab script from excel.It's basically I press the hyperlink or something in excel and the matlab script will pop up and run automatically in MATLAB. I'm appreciated for the help. Thank you.

回答 (2 件)

KL
KL 2017 年 8 月 24 日
There's nothing you can do inside Matlab to do this. Anyway, you should do it with a batch file and hyperlink that file on your excel cell.
"MATLAB PATH\matlab.exe" -nodisplay -nosplash -nodesktop -r "run('FILE PATH\Untitled4.m');"
  2 件のコメント
José-Luis
José-Luis 2017 年 8 月 24 日
編集済み: José-Luis 2017 年 8 月 24 日
Quoting from the documentation:
"Automation is a COM protocol that allows one application (the controller or client) to control objects exported by another application (the server). MATLAB supports COM Automation server capabilities on Microsoft® Windows® operating systems. Any Windows program that can be configured as an Automation controller can control MATLAB. Some examples are Microsoft Excel® and Microsoft Access™, and many Microsoft Visual Basic® and Microsoft Visual C++® programs."
KL
KL 2017 年 8 月 24 日
Thanks José-Luis. I should read that.

サインインしてコメントする。


Jan
Jan 2017 年 8 月 24 日

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by