Setting current directory as save location for executable guis?
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    matlabuser12
 am 27 Apr. 2015
  
    
    
    
    
    Kommentiert: Image Analyst
      
      
 am 27 Apr. 2015
            I have a gui that performs an xlswrite function and creates a file called summary.xlsx in a folder. When I turn this into an executable I want the current directory of that executable to replace that filepath in xlswrite. What does this code look like?
0 Kommentare
Akzeptierte Antwort
  Image Analyst
      
      
 am 27 Apr. 2015
        For Windows, the attached function works to find the "real" folder where the executable is, which is not where mfilename says it is.
2 Kommentare
  Image Analyst
      
      
 am 27 Apr. 2015
				No. You'd do something like
executableFolder] = GetExecutableFolder();
%Later in my code
fullFileName = fullfile(executableFolder, 'DataSummary.xlsx');
xlswrite(fullFileName , DataSummary,1,'A2')
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu ActiveX finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

