Hi. I have a 66x3 cells of data. Im having a problem on importing this data from Excel to GUI table. How can I import them to the table? I want the results to show ONLY after I press a button. Is there a way to do it? Can you provide the code for it. Thank You very much!

댓글 수: 4

Adam Danz
Adam Danz 2019년 3월 12일
" Im having a problem on importing this data from Excel to GUI table"
Can you show what you've tried so far and explain why it's not working?
Ramon Ticzon
Ramon Ticzon 2019년 3월 12일
What I'm trying to do is just importing the excel data into array and put it into the workspace so I can select it in the 'Data' of UItable. My problem here is that the data is showing even if I am still not pressing a button (show results button).
Adam Danz
Adam Danz 2019년 3월 12일
Is there default data loaded into the GUI that appears as soon as the GUI is created? How could the GUI have access to data that doesn't exist yet?
Ramon Ticzon
Ramon Ticzon 2019년 3월 12일
What I mean is that I need the user to click a button before projecting the excel data.

댓글을 달려면 로그인하십시오.

 채택된 답변

Adam Danz
Adam Danz 2019년 3월 12일

0 개 추천

Here's an idea. Load your data ahead of time and store it in the UserData property of your button. That can be done anywhere in your code.
app.Button.UserData = data;
Then when the button is pressed and the ButtonPushedFcn callback is executed, you can move the data from the UserData property to the UItable.
function ButtonPushed(app, event)
app.UITable.Data = app.Button.UserData;
end

추가 답변 (0개)

카테고리

질문:

2019년 3월 12일

댓글:

2019년 3월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by