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