Hello! I'm using this code to get formulas from excel sheet:
excel = actxserver('Excel.Application');
excel.DisplayAlerts = false;
ibsex = excel.Workbooks.Open(filename);
pause(5)
ibssheet = ibsex.Sheets.Item('DATA');
line = strcat('B',num2str(today_row+1),':FP',num2str(today_row+1));
formulas = ibssheet.Range(line).Formula;
ibsex.Close
pause(5)
excel.Quit
pause(5)
the problem is that i recive the error "Undefined function or variable 'Sheets'" when Matlab is executing the line:
ibssheet = ibsex.Sheets.Item('DATA');
How Can I fix the problem? many thanks!
6 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452279
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452279
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452283
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452283
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452458
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452458
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452460
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452460
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452461
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_452461
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_537215
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/339411-undefined-function-or-variable-sheets#comment_537215
Sign in to comment.