Running macro from excel in matlab

1 vue (au cours des 30 derniers jours)
deep
deep le 14 Mai 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.

Réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by