Can Matlab automatically detect a new value in Excel?
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (2)
Image Analyst
el 14 de Abr. de 2025
0 votos
If you're using Windows and ActiveX, you can check out the properties and methods here:
Image Analyst
el 14 de Abr. de 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 comentario
Ebru Angun
el 9 de Mayo de 2025
Categorías
Más información sobre Data Import from MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!