MATLAB: Combining specific range of excel files into one excel file

combineimporting excel data

I've a folder which has 10 excel files. I want to combine A1:B100 from every file into a single file vertically one after another, such that the range becomes A1:B1000. And then I want to plot column A vs column B. Can someone please help me? Thank you.

Best Answer

  • files = dir('*.xlsx') ;
    N = length(files) ;
    data = cell(N,1) ;
    for i = 1:N
    data{i} = xlsread(files(i).name) ;
    end
    data = cell2mat(data) ;