problem in evalin with matlab app designer.
5 次查看(过去 30 天)
显示 更早的评论
Hello everyone.
so the problem is i get this message every time i save the data to the Excel file.
'Error using evalin
Undefined function or variable 'Excel'.
Error in xlswrite1 (line 2)
Excel=evalin('base','Excel');'
why? and how to solve it.
My Code:
% Saving the data:
app.NEW3='Results';
SubjectNumberH,=1000;
Excel = actxserver ('Excel.Application');
folder = pwd;
baseFileName =app.NEW3;
fullFileName = fullfile(folder, baseFileName);
ExcelWorkbook = Excel.workbooks.Add;
ExcelWorkbook.SaveAs(fullFileName,1);
ExcelWorkbook.Close(false);
invoke(Excel.Workbooks,'Open',fullFileName);
xlswrite1(fullFileName,SubjectNumberH,);
invoke(Excel.ActiveWorkbook,'Save');
Excel.Quit
Excel.delete
clear Excel
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!