Capturing a data stream


Does anyone know of a way, using HTML and Javascript only, to capture a data stream and save it to a file.

From this URL you get a lovely CSV ascii data string (IE only). How can this be saved to a file?

Looking forward to some innovative responses :cheesy:


Junior member
I don't know how to make IE save it automatically - every time I need to retrieve a file automatically, I use wget.

Hope this helps,


X-Ray Specs

Junior member
If you have excel, you could try the following.
Open a new worksheet and go to the tools menu where you should see MACRO. From there open the Visual Basic Editor and
create a new form. Place a button on the form and also the Microsoft Inet control.
The following code is setup to retrive the line of data into a comma delimited file.
If you put a timer on it, you will save this data every 10 seconds or every minute, whichever you fancy.

Private Sub CommandButton1_Click()

Inet1.AccessType = icUseDefault
Dim strURL As String
Dim fnum As Integer
Dim Textline As String

fnum = FreeFile
' Assign URL
strURL = ""
'Name file to save data too
FTSEFile = "D:\Trading\Data\AAL.csv"
' Retrieve the data into Textline
Textline = Inet1.OpenURL(strURL, icString)
Open FTSEFile For Append As #fnum
Print #fnum, Textline
Close #fnum

End Sub


Thanks to both of you.

Svengali, wget did not seem to recognise this as a 'virtual' file that is created by you using the URL to retrieve data. But its useful anyhow for other applications. Many thanks

X-ray, this worked quite well. Now for the automation which I should be able to do
Thanks again
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock    No Thanks