フィルターのクリア

xlswrite to import data from cell array

3 ビュー (過去 30 日間)
Mudasser Seraj
Mudasser Seraj 2018 年 5 月 25 日
コメント済み: Mudasser Seraj 2018 年 5 月 28 日
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
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()
Mudasser Seraj
Mudasser Seraj 2018 年 5 月 25 日
編集済み: Mudasser Seraj 2018 年 5 月 25 日
No, there's no particular reason. If I want to use writetable(), then what should be the code? Is it possible to write them as a sequence of sheets?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2018 年 5 月 25 日
filename = 'MySpreadsheet.xls';
for sheet = 1 : length(m)
writetable(m{sheet}, filename, 'sheet', sheet)'
end
  3 件のコメント
Walter Roberson
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.
Mudasser Seraj
Mudasser Seraj 2018 年 5 月 28 日
Yeah. That worked perfectly. Thank you so much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by