How to convert xls to mat file ?

I want to convert xls file to mat file

댓글 수: 4

Kan-Hua
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?
s k
s k 2016년 7월 20일
편집: s k 2016년 7월 20일
yes numerical array
Surendar Kumar Kodali
Surendar Kumar Kodali 2019년 12월 18일
need the table structure .
Walter Roberson
Walter Roberson 2019년 12월 18일
Use readtable() to get a table structure.

댓글을 달려면 로그인하십시오.

답변 (3개)

ES
ES 2014년 3월 4일

37 개 추천

%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
deep 2015년 3월 13일
This helped me :)
Andreas Goser
Andreas Goser 2015년 3월 16일
Then vote it up :-)
Tuffahatul Ummah
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
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.
sagar
sagar 2014년 3월 4일

0 개 추천

I have already xls file with 6 column and it contain numeric and string data. So I want to convert into mat file..

카테고리

도움말 센터File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

태그

질문:

2014년 3월 4일

댓글:

2019년 12월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by