I am using MATLAB as an ActiveX automation client. I receive an error when passing an input to an object, however the same object can take the same input value in Visual Basic.
For example, if I am using MATLAB to communicate with Excel, when I access the 'Column' property of a sheet and specify the column to be returned I receive an error.
With the following code
excelObj = actxserver('Excel.Application');file = excelObj.workbooks.Open('test.xls');sheet = excelObj.ActiveSheet;cols = sheet.Columns('A:C');
I receive the error
??? Index exceeds matrix dimensions.
However, this syntax for specifying the range of columns to return, works in Visual Basic.
Best Answer