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!