Excel SaveAs method and naming conventions
    조회 수: 14 (최근 30일)
  
       이전 댓글 표시
    
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
채택된 답변
  Image Analyst
      
      
 2022년 6월 21일
        
      편집: Image Analyst
      
      
 2022년 6월 21일
  
      댓글 수: 6
  Image Analyst
      
      
 2022년 6월 29일
				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);
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


