Opening excel file not on path using winopen GUI

2 ビュー (過去 30 日間)
Henry
Henry 2014 年 7 月 25 日
回答済み: Robert Cumming 2014 年 7 月 25 日
Hi,
After running a simulation, I save the data to an excel file with the name of that file saved into handles.file, defined when the GUI is initialized. The user then presses a pushbutton to open the file using
WINOPEN([handles.file, '.xls']);
This all works fine.
However, this only worked when the GUI and the simulation the GUI ran were on the same path. If the simulation isn't in the same folder as the GUI, the excel file is written to the same directory as the sim, and so the GUI can't find the excel file when I try to open it.
How do you alter the above code so that it looks in the right place? Something like
winopn('C:/myfiles/',[handles.file, '.xls'])
Although this obviously doesn't work
Thanks,
Henry

回答 (1 件)

Robert Cumming
Robert Cumming 2014 年 7 月 25 日
help fullfile

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by