xlswrite to import data from cell array
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a matrix 'm' with 373 cell. each containting 2-d matrix of different size. I want to use 'xlswrite' to write the contents of each table on different sheets of the same file. Can someone please help me in this regard?
2 个评论
Walter Roberson
2018-5-25
Is there a particular reason you are not using writetable() to write those tables? You can pass 'Sheetname' to writetable()
采纳的回答
Walter Roberson
2018-5-25
filename = 'MySpreadsheet.xls';
for sheet = 1 : length(m)
writetable(m{sheet}, filename, 'sheet', sheet)'
end
3 个评论
Walter Roberson
2018-5-26
The first thing I would try would be to add a pause(5) after the writetable() to give the previous action time to finish.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!