how to store or display some data from excel sheet in uitable created in GUI?
2 ビュー (過去 30 日間)
古いコメントを表示
*I am unable to dump the contents of excel sheet into the uitable created in GUI.*I am using data from excel sheetes to write matlab programs. Also I have crating a GUI containing all the program codes. But i want to display the data in a uitable from the excel sheets and I am unable to do it. I have wriiten the following code
f = figure('Position', [200 200 400 150]);
dat= rand([10,3]);
cnames = {'Actual', 'Forecast', 'Error' };
rnames={'1','2','3','4','5','6','7','8','9','10'}
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,'RowName',rnames,'Position',[20 20 360 100]);
From the above code table is created in a new figure with specified rows and columns. But the entries contains some redundant data and i havent provided any path to excel. i want to eliminate those redundant and provide a path to excel sheet so that the specified part of the cell come and fall into the uitable. How can I do this?
0 件のコメント
回答 (1 件)
Iain
2013 年 6 月 11 日
[n,t, r] = xlsread(filename,sheet, range...);
substitute "r" for dat, uigetfile can be used to get the path and the filename of a file, the sheet can be specified, or left to user selectable, just look at the help for xlsread.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!