Cancel the beep and an error msg in GUI button cancellation
1 回表示 (過去 30 日間)
古いコメントを表示
I created a save2XLS button in GUI that contain the following code:
[filename,pathname]= uiputfile('*.xls','Save as');
column=get(handles.foTable,'columnname')' ;
dataX=get(handles.foTable,'data');
num=[column;dataX];
fullFileName = [pathname filename]
if exist(fullFileName)
%overwrite the file
delete([pathname filename])
xlswrite([pathname filename],num);
else
%write new file
xlswrite([pathname filename],num);
end
If I decide to cancel the "save as" operation by clicking the X or the cancel button I get a beep and an error in the command window. How can I cancel it?
Thanks
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!