Problem loading files to standalone installer when deploying a GUI as application
이전 댓글 표시
Recently i created an standalone application using MATLAB Compiler but it needs several excel files to work. When running the GUI, it works perfectly but the executable doesn't. I needed to copy the files to the folder containing the executable to make it work but i wish to skip this and include the files when compiling. Is there a way to make the application contain the files as soon as it is installed? Thanks
답변 (1개)
OCDER
2018년 7월 25일
mcc -m myGUI.m -a ./MyExcelDir
%This compiles your GUI AND add all files + subfolders specified after "-a"
If using applicationCompiler, select your myGUI.m as the main file, and then in the bottom, there is a section called "Files required for your application to run". Add your excel files/folder there.
You'll have to test out the relative path to your excel files in the standalone application. You could probably just summon the excel file by name without path.
Data = xlsread('myExcel.xlsx'); %Works since the excel file is in the compiled application path
댓글 수: 4
Edison
2018년 7월 25일
OCDER
2018년 7월 25일
How are you loading the excel files? Can you show that code? Maybe the excel files are there, just not being loaded correctly.
Walter Roberson
2018년 7월 25일
mcc is something you would call from the command line to build the application, instead of using the application compiler.
Edison
2018년 7월 25일
카테고리
도움말 센터 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
