MATLAB Answers

Undefined function or variable 'Sheets'.

32 ビュー (過去 30 日間)
Adriano
Adriano 2017 年 5 月 9 日
Commented: Adriano 2018 年 2 月 20 日
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 件のコメント

表示 3 件の古いコメント
Jan
Jan 2017 年 5 月 9 日
Dear dpb, I need some time to understand terms like "know nuthink!"
Guillaume
Guillaume 2017 年 5 月 9 日
I would recommend commenting out the DisplayAlerts = false in case excel actually shows an alert and instead having
%excel.DisplayAlerts = false; %leave on for debugging
excel.Visible = true;
Does anything pop up in excel?
Adriano
Adriano 2018 年 2 月 20 日
Excel doesn't open any pop up but the problem persist.

サインイン to comment.

件の回答 (0)

サインイン してこの質問に回答します。


Translated by