Filter löschen
Filter löschen

Automatic import of Spread sheet data

2 Ansichten (letzte 30 Tage)
Paul
Paul am 15 Sep. 2014
Kommentiert: Iain am 16 Sep. 2014
Hi,
I am dealing with a spreadsheet which is linked to Bloomberg and therefore it is updating like every 1 min or so. I would like to find a way how i can automatically import the spreadsheet into a Matlab table every time the Spreadsheet data changes. Any suggestions how i can proceed on this issue?
best regards,

Akzeptierte Antwort

Iain
Iain am 15 Sep. 2014
It is possible to use a macro in excel that will tell matlab, in some way, if it has been updated.
It is also possible to just check the spreadsheet, from matlab, every "n" seconds. ("pause" & xlsread, being the commands you'd want)
It is also possible to control the spreadsheet's operation from matlab via an active x server.
  6 Kommentare
Paul
Paul am 15 Sep. 2014
Bearbeitet: Paul am 15 Sep. 2014
tic & toc, or "now" or "clock" might give you better timing control than pause. Pick the right tool.
where would i put these commands you are referring to?
Iain
Iain am 16 Sep. 2014
It depends what you're doing.
This:
tic
do stuff
a = toc;
Makes "a" store how long it took to "do stuff".
now & clock both return the current time, so you can calculate how long it took to:
a = now; or clock...
do_stuff
b = now; or clock...
time_taken = b-a;
With those you can make sure you only read the excel file at specific times. (say, once every minute, at 25 seconds.)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by