Standalone Application uses Excel Sheet Template and writes in it, cant find it path
2 ビュー (過去 30 日間)
古いコメントを表示
My Code uses a Excel Sheet Template and fills cells with calculatet varaibles using writetable(). I use uiputfile() to give the user the choice what name and where to save his file. Running the Code in Matlab works perfect but using it as a Standalone Application I cant open the new saved file. Excel gives me the error: Can`t find path to file, it mus be renamed, used by another programm or deleted.
I am new to Matlab and happy for any tipps and criticism. Can't help myself.
function ReportButtonPushed(app, ~)
[file,path] = uiputfile('*.xls', 'Fileselector');
fullfilepath = fullfile(path,file);
copyfile("Protokoll_Template.xls",fullfilepath);
...
7 件のコメント
Walter Roberson
2022 年 11 月 21 日
Has the exe terminated by the time you try to open the file in excel?
回答 (1 件)
arushi
2024 年 8 月 29 日
Hi Evmi,
I understand that you are experiencing an error message when running the mentioned code in a standalone application created using Application Compiler.
I faced a similar issue in the past, but I was able to resolve it by using 'uigetfile' instead of 'uiputfile'.
Please try replacing the 'uiputfile' function with 'uigetfile' in your code and it should resolve the error.
For additional information on 'uigetfile' please refer to the following documentation:
I hope this helps!
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!