필터 지우기
필터 지우기

Why is the excel file I export from SIMULINK to MATLAB corrupted?

조회 수: 1 (최근 30일)
Justin Yeung
Justin Yeung 2017년 2월 5일
답변: Ankitha Kollegal Arjun 2017년 2월 8일
So I have a SIMULINK model and I export it to MATLAB. I do this by using the "To Workspace" block. I go to MATLAB and export the data to an excel file. I do this by running a simple command:
A=[tout,y];
save filename.xls A
Every time I go an try to open the excel file in Excel 2016, it deems the file corrupt and a bunch of gibberish appears on the screen. Any thoughts to why this happens?

답변 (1개)

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun 2017년 2월 8일
Hi Justin,
I could reproduce the issue you are facing. The issue is with the way in which you are saving the data to the Excel file. "xlswrite" should be used instead of "save".
That is, instead of:
save filename.xls A
Use:
xlswrite('filename.xls',A);
Please refer the documentation for more information on using "xlswrite":

카테고리

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