Loading excel file by GUI
이전 댓글 표시
I am trying to load an excel file via GUI. The line of code i used in a regular script was:
%%Read excel file to MATLAB
% Select file from prompt (only excel, csv and txt files)
excelfile = uigetfile('*.xlsx;*.csv;*.txt;','Select event file generated by ActivPAL');
From which i later used 'excelfile' for:
TF = strncmpi(excelfile,datefile.ParticipantID,8);
PreIDParticipant = datefile(TF==1,:);
However, when implementing this in the GUI script, i get the error:
Undefined function or variable 'excelfile'.
Error in TestUI>Calculation_Callback (line 153)
TF = strncmpi(excelfile,datefile.ParticipantID,8);
When executing these commands in the command window, everything works. What is the cause of it not working in the GUI script?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!