how to convert table with struct to excel sheet
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
hussain abdelaziz
am 8 Apr. 2021
Kommentiert: hussain abdelaziz
am 18 Jul. 2021
i need to know how to convert this table with struct to an excel files with all the data in ... please if you can help but the code to me ( i don't need file name )
0 Kommentare
Akzeptierte Antwort
Mohammad Sami
am 8 Apr. 2021
Not really sure about what your data looks like. Assuming your structs are compatible, you can concatenate them together.
s = vertcat(result.bw{:});
s = struct2table(s);
writetable(s,'myexcel.xlsx');
4 Kommentare
Mohammad Sami
am 10 Apr. 2021
Yes that can be done.
if true
n = cellfun(@length,result.bw);
f = repelem(result.fileName,n);
s = vertcat(result.bw{:});
s = struct2table(s);
s.fileName = f;
writetable(s,'myexcel.xlsx');
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion 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!