How to save a struct into a excel sheet one specifically?

5 ビュー (過去 30 日間)
dharmin
dharmin 2023 年 7 月 2 日
回答済み: Voss 2023 年 7 月 2 日
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!

採用された回答

Voss
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);
Warning: Added specified worksheet.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by