数字の0から始まるデ​ータをExcelに書​き込む方法

添付したmファイル「Excelwritetest.m」を実行しましたが、質問状.pdfの図1のような実行結果となりました。
質問状.pdfの図2のように「Matlabの操作のみで、先頭に0の値があるデータをExcelに書き込む」ということは可能でしょうか?

 Accepted Answer

michio
michio on 30 Jul 2020

0 votes

テキストエディターで開くと 0570 と出力されておりますね。Excel で開くと 570 と解釈されるようですね。
writecell(Tdata,'mfilewrite.xlsx')
最初から xlsx ファイルとして保存すると、私の環境では Excel で開いた場合もご所望の表示となっておりました。
参考まで。

1 Comment

Shouhei Ookouchi
Shouhei Ookouchi on 30 Jul 2020
迅速な対応誠にありがとうございました。

Sign in to comment.

More Answers (1)

Toshinobu Shintai
Toshinobu Shintai on 30 Jul 2020

0 votes

csvではなく、xlsxで保存すると0570で表示できました。
23行目を以下のように変えてみてください。
writecell(Tdata,'mfilewrite.xlsx')

Categories

Products

Release

R2020a

Tags

Community Treasure Hunt

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

Start Hunting!