How to write cell array to excel file
显示 更早的评论
I have a cell array whose elements have different sizes. How can I write it to an excel file?
For example:
a = rand(10,1);
b = rand(5,1);
c = rand(4,8);
X = {a, b, c};
How can I export X to an excel file?
采纳的回答
更多回答(2 个)
Try this:
writecell(X, 'X.xlsx')
2 个评论
Walter Roberson
2020-4-9
The result of that would be a single row with numel(a)+numel(b)+numel(c ) columns.
parham kianian
2020-4-10
Qiang Lei
2022-5-20
0 个投票
writetable(cell2table(X), 'X.xlsx')
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!