I need to merge multiple excel sheets data into one and at the sametime be able to access the data individually, in the sense
'Lets say I have 4 excels files with same type of structure (for example K rows and 5 columns), number of rows in each excel sheet is not the same but the coulumn number is the same. Now I want to merge those Excel sheets and when I need data from file 2, the program should display only data of file 2 but the merged data should not vanish!
Next if I want to add 5th file I need to have flixibility to be able to do that as well!'
I would appretiate the help!

1 件のコメント

darova
darova 2020 年 3 月 9 日
What about for loop? Read all data together and write into file

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

 採用された回答

darova
darova 2020 年 3 月 9 日

0 投票

Something like that
A1 = []
A = [];
for i = 1:n
filename = ['data' num2str(i)];
A1 = xlsread(filnemae);
A = [A;A1]; % concantenate vertically
end
xlswrite('data_full',A)

その他の回答 (0 件)

質問済み:

2020 年 3 月 9 日

回答済み:

2020 年 3 月 9 日

Community Treasure Hunt

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

Start Hunting!

Translated by