필터 지우기
필터 지우기

export from matlab to excel

조회 수: 5 (최근 30일)
Chaudhary P Patel
Chaudhary P Patel 2020년 2월 1일
편집: stozaki 2020년 2월 3일
sir help me about the commad how can i export my result in to the excel file.

답변 (3개)

stozaki
stozaki 2020년 2월 1일
편집: stozaki 2020년 2월 1일
You can use writematrix or xlswrite.
Please see following URL.
R2019a or later : writematrix
example code
M = magic(5)
writematrix(M,'M.xlsx','Sheet',2,'Range','A3:E8')
R2018b or earlier : xlswrite
exanple code
filename = 'testdata.xlsx';
A = [12.7 5.02 -98 63.9 0 -.2 56];
xlswrite(filename,A)
  댓글 수: 1
Chaudhary P Patel
Chaudhary P Patel 2020년 2월 1일
sir i did not get your point please clearify it with one example and i am using R2018a.

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


Chaudhary P Patel
Chaudhary P Patel 2020년 2월 1일
sir, it is not working,
>> filename = 'testdata.xlsx';
A = [12.7 5.02 -98 63.9 0 -.2 56];
xlswrite(filename,A)
Warning: Could not start Excel server for export.
XLSWRITE will attempt to write file in CSV format.
> In xlswrite (line 181)
>>
  댓글 수: 7
stozaki
stozaki 2020년 2월 1일
편집: stozaki 2020년 2월 1일
I ran the same script on the following versions, but no problem occurred. And I can't reproduce the warninig.
  • R2015a
  • R2018a
  • R2019b
Workaround: Open the .csv in Microsoft Excel. And SaveAs .xlsx.
If possible, can you reinstall R2018a and try it out?
Image Analyst
Image Analyst 2020년 2월 1일
Are you 100% sure you have Excel installed? Perhaps that might cause a problem.
If you don't have Excel on that computer, use csvwrite() to write a CSV file, which can be opened by WordPad.
Why are you not upgrading to R2019b, where you can get writecell()? It's much, much faster in my experience than xlswrite().

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


Chaudhary P Patel
Chaudhary P Patel 2020년 2월 2일
sir, i have excel and file is also opening in excel only thing is that i am not getting why this warning is showing there.
  댓글 수: 15
Walter Roberson
Walter Roberson 2020년 2월 3일
To open it in MATLAB use readtable() not xlsread()
stozaki
stozaki 2020년 2월 3일
편집: stozaki 2020년 2월 3일
@pramod kumar
Do you solve this problem? I got a similar warning on Linux without Excel installed. You may not have installed Excel correctly. (I know you are using windows10.)
@Walter Roberson @Image Analyst
Thank you for your help.

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

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by