How to convert xls to mat file ?

48 vues (au cours des 30 derniers jours)
sagar
sagar le 4 Mar 2014
Commenté : Walter Roberson le 18 Déc 2019
I want to convert xls file to mat file
  4 commentaires
Surendar Kumar Kodali
Surendar Kumar Kodali le 18 Déc 2019
need the table structure .
Walter Roberson
Walter Roberson le 18 Déc 2019
Use readtable() to get a table structure.

Connectez-vous pour commenter.

Réponses (3)

ES
ES le 4 Mar 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 commentaires
Andreas Goser
Andreas Goser le 16 Mar 2015
Then vote it up :-)
Tuffahatul Ummah
Tuffahatul Ummah le 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

Connectez-vous pour commenter.


Andreas Goser
Andreas Goser le 4 Mar 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 commentaire
aman slamaa
aman slamaa le 20 Avr 2017
how write Andreas? please type your steps

Connectez-vous pour commenter.


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

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by