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

 Accepted Answer

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 Comments

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

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!