STREAMING REAL TIME DATA FROM EXCEL TO MATLAB

조회 수: 12 (최근 30일)
Ciro
Ciro 2020년 2월 14일
댓글: Abbas HAMADE 2021년 3월 18일
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
Abbas HAMADE
Abbas HAMADE 2021년 3월 18일
doesn't work

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by