How can I combine data in multiple excel files an write the combined data in a new excel file data should be stored in column in excel file ?
    9 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Muhammad Salman  Sarfraz
 le 21 Oct 2017
  
    
    
    
    
    Commenté : SSG_newbiecoder
      
 le 20 Avr 2018
            suppose First excel file is that 1 5 7 2 7 9 second 3 9 8 4 5 2 final sheet should be like 1 5 7 2 7 9 3 9 8 4 5 2
0 commentaires
Réponse acceptée
  Michael Madelaire
      
 le 21 Oct 2017
        I am not entirely sure what the question is. But if you have two files:
file1.xlsx
file2.xlsx
and want to combine the data in the files two one file:
file3.xlsx
Then you can do as follows:
    data1 = xlsread('file1.xlsx'); % Load data from file 1
    data2 = xlsread('file2.xlsx'); % Load data from file 2
    data3 = [data1, data2];        % Create data for file 3
    xlswrite('file3.xlsx', data3); % Create file 3
If you are using .csv files, then you can replace the functions with.
    data = csvread(filename)
    csvwrite(filename, data);
3 commentaires
  Michael Madelaire
      
 le 21 Oct 2017
				You are welcome.
Yes, that would be the case if you want data3 to be a column. Which I now see is what you asked for! :)
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Spreadsheets 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!