I just noticed Matlab's new AI Chat Playground. I should have checked this out prior to posting my question (then again, 'My MATLAB Answers' is so effective). 
How to export a cell matrix into a MS Excel file
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
Attached is a cell array which I would like to export into a MS Excel spreasheet where each row correspond to one (of 12) years and would represent a tab inside that Excel file. Each of the 8 columns (or variables) would represent a column inside each tab. 
I know this can be done with the 'xlswrite' command (see here for an example). But that command has now been superseded by the 'writecell' command, which I have problems with. Thanks!
댓글 수: 3
  Dyuman Joshi
      
      
 2023년 12월 8일
				
      편집: Dyuman Joshi
      
      
 2023년 12월 8일
  
			And which array from the following list are you trying to save? ans?
z = load("THRESH_DATA.mat")
채택된 답변
  Voss
      
      
 2023년 12월 8일
        filename = 'test_THRESH_DATA.xlsx';
N = size(THRESH_DATA,1);
for ii = 1:N
    T = table(THRESH_DATA{ii,:});
    writetable(T,filename,'Sheet',ii,'WriteVariableNames',false);
end
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


