Can Matlab Compiler package stand-alone apps that can read and write data to an Excel spreadsheet?

조회 수: 27 (최근 30일)
I have created a program that involves reading and writing information to an Excel spreadsheet. I have created a stand-alone app using Matlab Compiler, but the program will not write or open the Excel spreadsheet. I am using writetable and xlsread.
  댓글 수: 2
Dennis
Dennis 2018년 8월 2일
Yes, this can work. Without more information it is hard to pinpoint the error. My first guess would be that the path to your files is incorrect.
Austin Brehm
Austin Brehm 2018년 8월 7일
편집: Austin Brehm 2018년 8월 7일
I am trying to compile an application with SelectFile.m as the main and SelectFile.fig, Alternative.m, Primary.m, Alternative.xlsx, and Primary.xlsx as required files. Before packaging the app, I have all of these files in the same folder named "Austin's Research Project". After packaging, installing, and running the app, an error message pops up (3.png). Any help with this issue?

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

답변 (1개)

Harsh
Harsh 2018년 8월 3일
You can use MATLAB compiler to compile programs that read and write from an Excel. As Dennis mentioned, make sure the Excel exists and has the correct path available to the compiled program. This link maybe helpful to package the excel file with your code.
Also suggest using readtable instead of xlsread. As an additional option, you can create a log file that would give runtime information on the exact error message MATLAB is encountering. To do this use 'Additional runtime settings' on the Application Compiler GUI or use the -R option with mcc.
  댓글 수: 2
Austin Brehm
Austin Brehm 2018년 8월 7일
https://www.mathworks.com/matlabcentral/answers/413309-can-matlab-compiler-package-stand-alone-apps-that-can-read-and-write-data-to-an-excel-spreadsheet#comment_597436

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

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by