How to store an actxserver variable in Simulink

1 view (last 30 days)
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

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!