When I execute the following code:
Excel = actxserver('Excel.Application');op = invoke(Excel.Workbooks, 'open', 'MyFile.xls');Sheets = Excel.ActiveWorkBook.Sheets;target_sheet = get(Sheets, 'item','Sheet1');invoke(target_sheet, 'Activate');Activesheet = Excel.Activesheet;cellname = 'B2';Range = Activesheet.cells.Range(cellname,cellname);
I receive the following error:
??? Error using ==> range Too many input arguments. Error in ==> MyScript at 8 Range = Activesheet.cells.Range(cellname,cellname);
This error does not occur in MATLAB releases prior to R2007a.
Best Answer