How to store an actxserver variable in Simulink

I have a simulink model where on the first iteration i want to open up an actxsever for excel Then on other iterations i want to 'iterate' on it, by writing to it each iteration, but the problem is, i cant seem to have one matlab function block call it, and another one iterate on it.
In other words, when i do the following... Excel = actxserver('Excel.Applicatoin'); Workbook = Excel.Workbooks.Open(filename); in an MATLAB function block in simulink. I cannot save Excel or Workbook variables to be called elsewhere in the model...
Ive tried DataStore, but it doesnt seem to allow that datatype...
Is there a way to store the variable Excel = actxserver('Excel.Application'); in a block to be used at other points in the model?
Thanks

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息

产品

提问:

2014-3-18

Community Treasure Hunt

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

Start Hunting!

Translated by