Excel SaveAs method and naming conventions
    14 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
I was curious if there was a built in WB.SaveAs method and how to use it. 
I'm currently using WB.Save to highlight the difference between two excel files, but wanted to have not override the original document. 
Also would like the files' names to end differently as well by using the folder's names at end, as excel doesn't want to open up two files with the same names. 
0 commentaires
Réponse acceptée
  Image Analyst
      
      
 le 21 Juin 2022
        
      Modifié(e) : Image Analyst
      
      
 le 21 Juin 2022
  
      6 commentaires
  Image Analyst
      
      
 le 29 Juin 2022
				Try it this way:
baseFileName = sprintf('%s_%2.2d.xlsx', fname, file_index);
fullFileName = fullfile(pwd, baseFileName);
fprintf('Saving "%s".\n', fullFileName);
WB.SaveAs(fullFileName);
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Environment and Settings 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!


