Why do I get Excel error when using writetable command ?

5 ビュー (過去 30 日間)
farzad
farzad 2019 年 12 月 26 日
コメント済み: farzad 2019 年 12 月 27 日
Hi All
I have the TT parameter as :
[c1,hist,edges,rmm,idx] = rainflow(Z,t);
TT = array2table(c,'VariableNames',{'Count','Range','Mean','Start','End'});
While I have used to convert TT from a timetable to table with :
TT=timetable2table(TT);
I use the
writetable(TT,'output_file.xlsx'); % assumed filename "output_file "
but I get the error :
Error using writetable (line 124)
Unable to write to sheet '' in file 'Ystat.xlsx'. Disable sheet protection, disable workbook's Mark as Final
option, and ensure input does not exceed cell capacity.
Then using here , I did
TT1=array2table(TT);
writetable(TT1,name);
and I get :
Error using writetable (line 124)
Index exceeds matrix dimensions.
  4 件のコメント
farzad
farzad 2019 年 12 月 27 日
dear Walter, I think I was over writing a previous paramter called the same as TT with the new one in my array2table command, so it was not the right format to be written on excel file, but I resolved the problem thank you
farzad
farzad 2019 年 12 月 27 日
the size was 128350 x 2 , but with correction of the paramter name, I wrote it

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

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 12 月 26 日
Try?
xlswrite('output_file.xlsx',TT);
  2 件のコメント
farzad
farzad 2019 年 12 月 26 日
No that was the first try.
the Table I created, containts headers, but xlswrite does not write string with numbers to Excel file
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 12 月 26 日
Please provide
>>whos TT

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by