Hyperlink in Excel cell to open Simulink model?

조회 수: 1 (최근 30일)
Jerki Jokne
Jerki Jokne 2020년 5월 4일
편집: Jonas 2020년 5월 7일
Hello, I realize that this may be more of an Excel related question, but perhaps someone from this forum has already done what I am trying to do. I would like to create a hyperlink in Excel that will open a Simulink model. So basically I would have a cell with the text sldemo_fuelsys, and it would be hyperlinked to run the Simulink command open_system('sldemo_fuelsys'); Is this possible? Admittedly I have never created a macro in Excel, so I am not an expert in Excel. Thank you for your help in advance!

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 5월 5일
In Excel, you can "Insert Link", "Existing file or web page", navigate to find the .slx or .mdl model file. When you click it, it will follow the default Windows program to run MATLAB, and then open the Simulink model.
  댓글 수: 2
Jerki Jokne
Jerki Jokne 2020년 5월 5일
Thanks! This will link to a model. Would it be possible to link to a block, so that when I click the link in Excel it runs the hilite_system command?
Fangjun Jiang
Fangjun Jiang 2020년 5월 6일
I can't think of a decent way to do it.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jonas
Jonas 2020년 5월 7일
편집: Jonas 2020년 5월 7일
You can launch Matlab from Windows system prompt, see the documentation. Maybe you can find a way to execute a command line code from Excel, and then find the correct command line to use the 'hilite_system' command. Maybe this can help.

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by