Running macro from excel in matlab

1 view (last 30 days)
deep
deep on 14 May 2019
Hi,
I am trying to run a macro in excel through matlab using following commands
ExcelApp = actxserver('Excel.Application');
ExcelApp.Workbooks.Open(fullfile(pwd,'\INPUTandOUTPUT.xlsm'));
retVal = ExcelApp.Run('Macro1');
Quit(ExcelApp);
delete(ExcelApp);
% ExcelApp.release;
Here the excel gets locked and is not writable anymore.
I have some results to be written in this file post completion of my run.
Can anyone help me resolve this issue.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!