STREAMING REAL TIME DATA FROM EXCEL TO MATLAB

14 次查看(过去 30 天)
Dear all,
I have an excell spreadsheet feeded in real time trought a DDE from a trading platform, my aim is to stream the real time data from excel to Matlab. Matlab DDE functions are not available in my version which is R2018a, so I can't stream the data directly in Matlab without pass through excel.
The data in excel is available in a table in which the value of all cells vary over time without a defined frequency; my aim is to acquire in Matlab the value "as it comes" from market. The acquisition of the data each "x seconds" (at a fixed sample frequency) is useless for my scope.
Attached there is a zip file which containes a short screen recorded video of 10 seconds which shows the excel table which I want to aquire; the video shows the dynamics with which the value in cell vary.
Is there a way to do what I intend to do?

回答(1 个)

Jacob Wood
Jacob Wood 2020-2-14
编辑:Jacob Wood 2020-2-14
One possibility - you can constantly read the Excel document with xlsread(); this will read in new values every time the Excel document is saved.
while 1
d = xlsread('test.xls');
disp(d)
end
Additionally, and likely a faster solution, would involve having Excel stream the data to a socket which Matlab is listening to.
  2 个评论
Ciro
Ciro 2020-2-17
Dear Jacob,
thanks for your prompt reply; the table generated with xlsread is static and does not update in real time. Moreover the loop you have suggested keep the Matlab busy indefinitely showing (disp(d)) always the same values aquired in the beginning. In addition I get 'NaN' values for all the cells whose values are dinamically updated in the excel.
For the second solution you have proposed, which foresees the excel to stream the data in a socket, I'm still evaluating it; It could be a solution. I'll keep you updated.
Thanks!
Ciro

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Single-Rate Filters 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by