【文件属性】:
文件名称:原创Matlab读取Excel并显示-ExcelReader.rar
文件大小:11KB
文件格式:RAR
更新时间:2022-09-01 20:34:30
matlab
原创Matlab读取Excel并显示-ExcelReader.rar
运行效果
excelreader.JPG
主程序如下,没有M币的朋友就自己贴回去,再做个.fig文件就可以用了,需要2个控件
controller name
button: buttion1
uitable: data_table
function pushbutton1_Callback
% hObject handle to pushbutton1
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data
[file path] = uigetfile;
sdataset = dataset;
varnames = get;
[row col] = size;
dcell = cell;
for n=1 : col
pdata = eval))); %取出dataset内部数据
try
dcell = pdata;
catch ME %转换 数字和Char 数据
if isa
dcell = cellstr;
else
dcell = mat2cell,repmat,1);
%把数字型数据变成 row * 1 的cell
end
end
end
set; %设定uitbale 的标题栏名称
set; %写入uitable的数据
所含文件:
Figure18.jpg
【文件预览】:
ExcelReader
----testxls.xlsx(9KB)
----ExcelReader.fig(2KB)
----ExcelReader.m(4KB)
Matlab中文论坛--助努力的人完成毕业设计.url
使用帮助:新手必看.htm