I have an excel sheet containing 30 rows and 30 columns. Using Matlab Guide, I read the excel sheet. Now I want to display the contents of the excel sheet as a table (figure) containing 30 rows and 30 columns.
I tried with uitable.
p1 = xlsread('C:\Documents and Settings\user\Desktop\sample.xls','Sheet1'); f = figure('Position',[100 100 752 350]); t = uitable('Parent',f,'Position', [ 25 25 700 200]); set(t, 'Data', p1)
On executing the above code, I get the following error: ??? Invalid handle object.
What am I supposed to do???
I am using Matlab 7.0.1.
Thanks in advance for the help.
No products are associated with this question.
Insert a uitable in your GUI by name say TableDemo. then read data from xls like you have done,
p1 = xlsread('C:\Documents and Settings\user\Desktop\sample.xls','Sheet1');
handles.tabledemo = uitable('Position', [ 25 25 700 200]); set(handles.tabledemo,'Data',p1); guidata(f, handles); % Store handles in the ApplicationData of f for later use
Play games and win prizes!Learn more