Import excel data in gui files
Show older comments
I created a gui. When I writing this gui, I specified the path and then got the exe file. In this gui I use a number of Excel files as input. How can I set the path of the gui than the user can import excel files from anywhere in the system (The user may choose a file other than the path that written in the gui).
5 Comments
dpb
on 30 Jun 2019
Whatever interface you've provided the user to specify the input files must return the information including location besides just the file name itself; then your code must use that information to build and open the file using the fully-qualified name.
uigetfile() has optional pathname return variable, for example.
You'll find fullfile() and fileparts() of help in performing such shenanigans, undoubtedly.
Fayez Ferdospanah
on 30 Jun 2019
dpb
on 30 Jun 2019
You'll have to show code; descriptions won't cut it.
If you pass a fully-qualified file name to any of the ML functions, they will open that particular file presuming the user has proper permissions, etc., etc., ...
When you build an executable, however, some functions aren't available; you'll have to ensure whatever you use is within the allowable subset for automagic code generation with the function you need or write additional code to do so directly.
I've never built a standalone executable, so can't comment from firsthand knowledge but I can't but think there's a way to accomplish the objective.
Fayez Ferdospanah
on 30 Jun 2019
dpb
on 30 Jun 2019
I don't know what that means and we can't comment on what we can't see...we don't know what you've actually done other than by a verbal description.
If it doesn't do what you want, only way anybody can possibly help would be to see what you did do, specifically.
Answers (0)
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!