How to convert xls to mat file ?

44 Ansichten (letzte 30 Tage)
sagar
sagar am 4 Mär. 2014
Kommentiert: Walter Roberson am 18 Dez. 2019
I want to convert xls file to mat file
  4 Kommentare
Surendar Kumar Kodali
Surendar Kumar Kodali am 18 Dez. 2019
need the table structure .
Walter Roberson
Walter Roberson am 18 Dez. 2019
Use readtable() to get a table structure.

Melden Sie sich an, um zu kommentieren.

Antworten (3)

ES
ES am 4 Mär. 2014
%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 Kommentare
Andreas Goser
Andreas Goser am 16 Mär. 2015
Then vote it up :-)
Tuffahatul Ummah
Tuffahatul Ummah am 21 Sep. 2016
AllData={txt;num};%as you want what txt and num mean? i don't have clue for what must I fill it

Melden Sie sich an, um zu kommentieren.


Andreas Goser
Andreas Goser am 4 Mär. 2014
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 Kommentar
aman slamaa
aman slamaa am 20 Apr. 2017
how write Andreas? please type your steps

Melden Sie sich an, um zu kommentieren.


sagar
sagar am 4 Mär. 2014
I have already xls file with 6 column and it contain numeric and string data. So I want to convert into mat file..

Kategorien

Mehr zu Workspace Variables and MAT Files finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by