Can Matlab automatically detect a new value in Excel?
Mostra commenti meno recenti
I am using a program called Stella, which writes its results to an Excel spreadsheet. I want that whenever Stella writes its new results, Matlab detects that the result is new and processes it automatically.
Can I do that? If yes, how?
Risposta accettata
Più risposte (2)
Image Analyst
il 14 Apr 2025
0 voti
If you're using Windows and ActiveX, you can check out the properties and methods here:
Image Analyst
il 14 Apr 2025
How about if you use dir to get the file date/time stamp and then if it's later than the last time you processed it then Stella must have changed it and your program can do it's thing.
for k = 1 : whenever
d = dir('data.xlsx');
thisDate = d.datenum;
if thisDate ~= lastDate
% Then Stella modified it.
% Process it somehow.
% Then set the last date to this date
% so we can see when it changes again.
lastDate = thisDate;
end
end % of loop where you check the workbook file.
1 Commento
Ebru Angun
il 9 Mag 2025
Categorie
Scopri di più su Spreadsheets in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!