How to save a struct into a excel sheet one specifically?
조회 수: 8 (최근 30일)
이전 댓글 표시
Good evening, community! Could someone kindly assist me in saving data from a struct to an Excel sheet? Specifically, I would like to store different data on multiple sheets, all following the same format. Essentially, I aim to save all the different results in a single Excel file. I have attached a file that contains the variable I am working with. Thank you in advance for your help!![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1424588/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1424588/image.jpeg)
댓글 수: 0
채택된 답변
Voss
2023년 7월 2일
Use the 'Sheet' argument in writecell.
fn = 'your_excel_file.xlsx';
% writing some simple cell arrays because I don't know what from your
% Results struct goes into each sheet or what the format should be.
writecell({1 2; 3 4},fn,'Sheet',1);
writecell({5 6; 7 8},fn,'Sheet',2);
댓글 수: 0
추가 답변 (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!