Hi, I used to run certain matlab scripts for formatting excel sheets. I use activex for accesing Excel(Office 2003) in those scripts. Now I have migrated to Excel 2010, and now the Excel Object's .save method does not seem to work. can anybody help me?
% Create COM object for the current Sheet.
objExcel=actxserver('excel.application');objExcelW=objExcel.Workbooks;ExcelFilePath = pwd;objExcelF=objExcelW.Open(fullfile(ExcelFilePath, ExcelFileName));objExcelS=objExcelF.ActiveSheet;....some formatting, data write operations etc using the sheet object objExcelS....% Delete the COM Object.
objExcelF.Save;objExcelF.Close;objExcel.Quit;objExcel.delete;
The script hangs at objExcelF.Save; 🙁
Best Answer