473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Saving array to a file

I have parsed some data from another website, and I would like to save the
data to a file so that I can link it to an access db.
The data is in an array and I cant seem to find the right code to get it to
save?

Here is what I have:

<%

Set ObjHttp = Server.CreateObject("Msxml2.XMLHTTP")
objHttp.Open "GET",
"http://www.tsn.ca/nba/Statistics.asp?category=Points&position=&division= &season=2005&type=player&endRow=520&startRow=1" ,
false
objHttp.Send
MyHTML = objHttp.ResponseText
Set objHttp = Nothing
MyVar = MID(MyHTML, instr(1, MyHTML, "bgcolor=""#F7EDE0""")-32, LEN(MyHTML))
MyVar = MID(MyVar, 1, instr(1, MyVar, "</table>")-1)
Dim myArray(17)
Dim ii 'col count
Do While instr(1, MyVar, "<tr") > 0
'// Now extract the 'record' from the table (like above code)
MyRec = MID(MyVar, instr(1, MyVar, ">")+1)
MyRec = MID(MyRec, 1, instr(1, MyRec, "</tr>")-1)
'// Now we should be left with all the <td>'s
ii = 0
Do while instr(1, MyRec, "<td") > 0
myValue = MID(MyRec, instr(1, MyRec, ">")+1)
myValue = MID(myValue, 1, instr(1, myValue, "</td>")-1)
'// We have successfully got a value from a <td>!
'// Maybe at this point you could load it into an array:
myArray(ii) = myValue
'// Now we have to clean the MyRec string up
MyRec = MID(myRec, instr(1, myRec, "</td>")+5)
ii = ii + 1
Loop

'Here it is just dumped to the page, I would like to save it to a file...
response.Write Join(myarray,",") & "<br>"

'// Now we have to trim up the main string
Myvar = MID(MyVar, instr(1, MyVar, "</tr>")+5)

Loop
%>

Thanks for reading
Jul 22 '05 #1
0 897

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Duncan Smith | last post by:
I am having problems saving arrays to file. e.g. >>> t1 array() >>> t2 array() >>> t3 array() >>> t4 array(,
3
by: andy_ro | last post by:
Hi group, I have an web application where the user can upload a pdf file. This file is stored in a table, in a column of type ntext. The user can later request the content of this column, and...
3
by: JamesB | last post by:
I am saving image files from my website using the downloaddata on the web client. This gives me a byte array, which I am then saving to a file with the following code: ' Create the new, empty...
8
by: Mark | last post by:
Hello. I am attempting to write binary data from a file to an OLE Object field, and then write the file back out from the database. I am reading and writing the files in binary mode, and using...
12
by: tjonsek | last post by:
I get a generic error (not very helpful) when attempting to save a re-sized image back to its original location. Here is the code snippet: Dim g As System.Drawing.Image =...
8
by: Yu SONG | last post by:
Hi all, What would be the most efficient way to save an array of floats to a file (in text format)? At the moment, my code looks like: /* * Saving an array of floats to a file
14
by: Simon | last post by:
I'm trying to write a little function to save data. Basically I have a large 2d array of structs, so I'm going to have to call the save function once per struct in the array. I'd like to save the...
1
by: WebCM | last post by:
We can do it in different ways. Configuration data are sent by POST. Some of them should be parsed before saving to file. Perhaps, I will use var_export(). However, how to do it best? 1....
5
by: Lucvdv | last post by:
This would better be described by 'serialization' than 'interop', but I didn't find a newsgroup that seems closer on topic. The problem in a few words: I save data with DataSet.WriteXML, but I...
3
by: pozze | last post by:
Hi, I've just made the change from ASP to .net. I have a file (code below) that saves a user submitted file to a MS SQL 2005 database. It collects the file name, file size, file type, and lastly...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.