Issue with MATLAB .exe seeing data in excel as stagnant data when I need it to be able to read with each run of the .exe
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have a program that uses XLSread and XLSwrite.
The program takes in some excel data from an excel file, we do some math, then we output to the excel file and open it up for the user to see the output.
This program works perfect in the IDE, but when I make an .EXE and try the program that way, whatever the last data I had in the excel run in the IDE, is ALWAYS the output for the .exe now. Even when I change the data in the excel file and rerun.
How would I go about making this dynamic? Or have the program read in the new data from the excel file with each subsequent run?
example:
******************************************************************************
% read in some data
[num,txt,raw] = xlsread('excelFile','REPORT');
% do some math
x= 5 * num (1)
%export it back to excel file
xlswrite('excelFile',matrix,'sheet1')
%open the file up for the user
winopen('excelFile')
******************************************************************************
any and all help is greatly aprecaited!
,Billy
0 Commenti
Risposte (1)
Walter Roberson
il 28 Giu 2023
read about ctfroot which is the directory that the code will be executing in, and the location that your named files will have been copied to.
The executable will NOT be running in the user's home directory. You will need to figure out the user directory by looking at windows environment variables. Caution: some of the folders named in the environment variables do not have drive letter, which is a different environment variable
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!