Can Matlab automatically detect a new value in Excel?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (2)
Image Analyst
le 14 Avr 2025
0 votes
If you're using Windows and ActiveX, you can check out the properties and methods here:
Image Analyst
le 14 Avr 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 commentaire
Ebru Angun
le 9 Mai 2025
Catégories
En savoir plus sur Data Import from MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!