Can Matlab automatically detect a new value in Excel?
Show older comments
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?
Accepted Answer
More Answers (2)
Image Analyst
on 14 Apr 2025
0 votes
If you're using Windows and ActiveX, you can check out the properties and methods here:
Image Analyst
on 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 Comment
Ebru Angun
on 9 May 2025
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!