Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Multiple files into Matlab from Excel
Replies: 15   Last Post: May 9, 2014 2:06 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Michelle

Posts: 8
Registered: 5/3/14
Multiple files into Matlab from Excel
Posted: May 3, 2014 3:41 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, I have a problem with writing a code that will read multiple Excel files of xlsx and organising the data within different matrices or the same matrix with different headers to separate the data. So what I got is over a hundred Excel files with a 2x4296 in size. What I need to do is put all the files in Matlab and organise them so that I can se which file is for what data.

I started with this but does not work.

clc;
clear all;

source_dir='/Users/MichelleTommosgard/Desktop/test';

source_files=dir(fullfile(source_dir,'*xlsx'));

i=n;
a=[];


for i=1:n

if i<=n

a=xlsread(source_files(i).name);
aa[1+i]=xlsread(source_files(i+1).name);

end

end



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.