What is the best way to write a duration type to an Excel file?
2 ビュー (過去 30 日間)
古いコメントを表示
Jason Nicholson
2016 年 1 月 14 日
コメント済み: Jason Nicholson
2020 年 12 月 28 日
I have an array of duration type. I want to write it to Excel and then use it as a time in excel. Is there a recommended way to get this effect?
d = duration([24;25],[0;10],[10;17]);
xlswrite('Example.xlsb', d);
If you write the d to Excel, the spreadsheet will not contain any version of the duration information in d.
0 件のコメント
採用された回答
Lars Abrahamsson
2020 年 12 月 23 日
What about the other function to create Excel files from tables?
writetable
その他の回答 (1 件)
Walter Roberson
2016 年 1 月 14 日
編集済み: Walter Roberson
2020 年 12 月 23 日
So write a serial date number which is the duration in days (and fraction of a day). You may wish to go in with ActiveX and apply a time format to the cell.
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!