how to export cell array to excel
조회 수: 5 (최근 30일)
이전 댓글 표시
My code generates a cell array with five (5x5) num cells and now I need to export it in a way that each cell of the array will be written in a different sheet of an excel file.
Actually if I use xlswrite, an empty xls file is generated.
I apologize for the silly question but I am a new matlab user and I have not found any useful information in the community
Thanks in advance
Davide
채택된 답변
KALYAN ACHARJYA
2020년 12월 15일
Lets say "cell_data" is cell array
[r c]=size(cell_data);
sheet_num=1;
for i=1:r
for j=1:c
data=cell_data{i,j};
xlswrite('cell_data.xlsx',data,['Sheet',num2str(sheet_num)]);
sheet_num=sheet_num+1;
end
end
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!