Exporting excell from matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Cem Eren Aslan
am 2 Jun. 2023
Kommentiert: Dyuman Joshi
am 3 Jun. 2023
Hi all,
I want to export a cell as Exell file from MatLab. How can i do that?
Thx
Akzeptierte Antwort
Kautuk Raj
am 3 Jun. 2023
To export a cell array as an Excel file from MATLAB, we can use the writetable function. This is an example which demonstrates how to do this:
% Create a sample cell array
myCell = {'Name', 'Age', 'Gender'; 'John', 25, 'Male'; 'Mary', 30, 'Female'};
% Convert the cell array to a table
myTable = cell2table(myCell(2:end,:), 'VariableNames', myCell(1,:));
% Write the table to an Excel file
writetable(myTable, 'myExcelFile.xlsx', 'Sheet', 1);
1 Kommentar
Dyuman Joshi
am 3 Jun. 2023
Why convert cell to table when you can directly write it to an excel file?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!