How to convert xls to mat file ?
显示 更早的评论
I want to convert xls file to mat file
4 个评论
Kan-Hua
2014-3-4
To convert a xls file to a mat file, you need to decide the data structure. What Matlab data structure do you want to use for storing your xls file? numerical array? cell array? or table?
Surendar Kumar Kodali
2019-12-18
need the table structure .
Walter Roberson
2019-12-18
Use readtable() to get a table structure.
回答(3 个)
ES
2014-3-4
%get the values in the Excel using xlsread.
[num,txt,raw] = xlsread(filename,sheet,xlRange);
%combine data as you want:
AllData={txt;num};%as you want
%save in mat file
save(matfileName,'AllData');%In your matfile name
3 个评论
deep
2015-3-13
This helped me :)
Andreas Goser
2015-3-16
Then vote it up :-)
Tuffahatul Ummah
2016-9-21
AllData={txt;num};%as you want what txt and num mean? i don't have clue for what must I fill it
Andreas Goser
2014-3-4
0 个投票
As of the complexity of what can be in an XLS file, the way to go is to import with XLSREAD, probably postprocess and then write the MAT file with SAVE.
1 个评论
aman slamaa
2017-4-20
how write Andreas? please type your steps
类别
在 帮助中心 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!