Can Matlab automatically detect a new value in Excel?
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (2)
Image Analyst
am 14 Apr. 2025
0 Stimmen
If you're using Windows and ActiveX, you can check out the properties and methods here:
Image Analyst
am 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 Kommentar
Ebru Angun
am 9 Mai 2025
Kategorien
Mehr zu Spreadsheets finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!