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.

1 件のコメント

aman slamaa
aman slamaa 2017 年 4 月 20 日
how write Andreas? please type your steps

サインインしてコメントする。

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 ExchangeWorkspace 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