Exporting Output text to Excel

조회 수: 1 (최근 30일)
John  Bowling
John Bowling 2016년 6월 22일
댓글: Shameer Parmar 2016년 6월 22일
How can i export the output line of MATLAB into a cell in excel? Say for example my output ans line says:
"Your batting average is 0.357"
How can i export that entire text into cell A1 in excel?
Thanks -John

답변 (1개)

Shameer Parmar
Shameer Parmar 2016년 6월 22일
xlswrite('ABC.xlsx',{'Your batting average is 0.357'},'Sheet1','A1');
and to open that xlsx file..
winopen('ABC.xlsx');
  댓글 수: 2
John  Bowling
John Bowling 2016년 6월 22일
Is there a way to automate this task? I dont want to type the output each time, rather i want to write it in a script and export multiple outputs. All without typing the actual output?
Shameer Parmar
Shameer Parmar 2016년 6월 22일
yes, you can create .m file for this command and add you logic for calling all your file one by one and writing the data in it.
so once you run this .m file, it will do the task automatically.
if you finding difficulty in creating .m file, let me know your requirement, I will help you..

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by