Save a DDE streaming data ina file

paolfili

New Member
Joined
Mar 25, 2011
Messages
8
I' ve a 10 sheet of DDE financial streaming data in Excel 2003.
Is possible (VBA routine?,macro?) save data in a file (i.e. every 1 second)?
Is possible save only the Changed data?

Thanks
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You're probably looking at the task the wrong way. You can get it so Excel tries to save a new workbook every second but it'll grind everything to a hault and may freeze it up.

The data is obviously coming from database or feed somewhere else. Why not create a C# program with multithreads that save the new data that flowed into a cache as a spreadsheet every 1 second?

Sounds like you're going to be saving a lot of data every second. Is it really needed? Can you go direct to the source? Why save every second?!
 
Upvote 0
Thanks for the reply.
I have some fianancial streaming data from a DDE link to an *.exe (the trading platform).
I'd like to save data in a file (1 second is only to have a reference...
probably 5 or 10 seconds is ok...)
No other way to collect data ....:-(


You're probably looking at the task the wrong way. You can get it so Excel tries to save a new workbook every second but it'll grind everything to a hault and may freeze it up.

The data is obviously coming from database or feed somewhere else. Why not create a C# program with multithreads that save the new data that flowed into a cache as a spreadsheet every 1 second?

Sounds like you're going to be saving a lot of data every second. Is it really needed? Can you go direct to the source? Why save every second?!
 
Upvote 0
Your exe is pulling out data from a spreadsheet that has DDE?!

If thats correct, why doesn't your exe just pull the data out? Seems muddled up. If the exe is pulling the data out it would then also have the ability to save spreadsheets every so often as well.

How strange...
 
Upvote 0
:confused:
I' ve a closed source executable ,the platform *.exe.
This is an executable to start a trading platform.
The platform is designed by the creators to eport DDE data to excel.
I want to be able to save the data.
The only different way is reverse engineer the platform and save the data filtered from the socket. (not so simple anyway).

Your exe is pulling out data from a spreadsheet that has DDE?!

If thats correct, why doesn't your exe just pull the data out? Seems muddled up. If the exe is pulling the data out it would then also have the ability to save spreadsheets every so often as well.

How strange...
 
Upvote 0
Code:
Option Explicit

Private Sub SaveCopies()

Dim SaveTo As String

SaveTo = "\\ServerName\Path\FileName " & CStr(Format(Now, "dd MMM yyyy HH mm ss")) & ".xls"

ThisWorkbook.SaveAs Filename:=SaveTo
Application.OnTime Now + TimeValue("00:00:20"), "SaveCopies"

End Sub

Change \\ServerName\Path\FileName to the location where you want to save the workbook. Also change the 20 number to the number of seconds you want it to loop and save.

:)
 
Upvote 0
Thanks a lot.
Works very well!

Is possible to make some enhancements?

I want to have different sheets with different DDE streaming data.
I have a different files each one with a list of symbols.
I want excel read the symbols and stream for each file I have in a different sheet.
I.e. This is the file1
-----------------
SYM1
SYM2
-----------------
This is the file2
---------------
SYM3
SYM4
------------
Ok.
I want in Sheet1 :
the stream of =TOS|VOLUME!'SYM1' and
=TOS|VOLUME!'SYM2'
in Sheet2 :
The stream of =TOS|VOLUME!'SYM3' and =TOS|VOLUME!'SYM4'


*********************
The I have the suggested routine:


--------------------------
Private Sub SaveCopies()

Dim SaveTo As String

SaveTo = "\\ServerName\Path\FileName " & CStr(Format(Now, "dd MMM yyyy HH mm ss")) & ".xls"

ThisWorkbook.SaveAs Filename:=SaveTo
Application.OnTime Now + TimeValue("00:00:20"), "SaveCopies"

End Sub
----------------------

Is possible to save data from each Sheet in different Files?
(using i.e. a Master macro that call childern macro each for each streaming sheet) ?

Thanks






Code:
Option Explicit

Private Sub SaveCopies()

Dim SaveTo As String

SaveTo = "\\ServerName\Path\FileName " & CStr(Format(Now, "dd MMM yyyy HH mm ss")) & ".xls"

ThisWorkbook.SaveAs Filename:=SaveTo
Application.OnTime Now + TimeValue("00:00:20"), "SaveCopies"

End Sub
Change \\ServerName\Path\FileName to the location where you want to save the workbook. Also change the 20 number to the number of seconds you want it to loop and save.

:)
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,543
Members
452,924
Latest member
JackiG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top