Hi!
I have a cell array like the following:
I want to put each matrix of row 2 in one spreed sheet named as text in row 1. Been trying but don't not know to do it.
Thanks

 Réponse acceptée

Stephen23
Stephen23 le 7 Avr 2022

1 vote

Where C is your cell array:
F = 'myfile.xlsx';
for k = 1:size(C,2)
T = C{1,k};
M = C{2,k};
writematrix(M, F, 'Sheet',T)
end

2 commentaires

Valeria AS
Valeria AS le 7 Avr 2022
Awesome!!
It works very well, thanks so much, Stephen!
Stephen23
Stephen23 le 7 Avr 2022
@Valeria AS: if it helped you, please remember to accept my answer :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by