I am having issues getting the ActiveX application to open an existing Excel doc for editing.
My current code looks like:
file_name = 'Excel_Book.xlsx';xl = actxserver('Excel.Application');xlb = xl.Workbooks.Open(file_name);
This returns the error:
ErrorInvoke Error, Dispatch Exception:Source Microsoft ExcelDescription: 'Excel_Book.xlsx' could not be found
I know that the file exists, as I can read it with
xlsread(file_name)
I have even changed the MATLAB directory to be seeing the folder with the Excel_Book file in it, and yet the ActiveX refuses to read the document.
Similar problems were encountered using:
xlb = xl.Workbooks.Item(file_name);orxlb = xl.get('Workbooks',file_name);
Best Answer