extract data from html and display in a tabular form??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello
i'm using Server.CreateObject("MSXML2.XMLHTTP") to extract the data from http://fn.yam.com/exchange/ and data looks like 0.542 1.322 112.160 5.305 1.278 1.582 0.809 1.323 33.425
8.277 ?^? 1.844 - 2.438 206.840 9.785 1.863 2.918
1.492 ......, how can i arrange these data in tabular form? any ideas?
 
Hey Ricky
Yes - although it depends on the data structure you're using to store it as "tabular form"... a 2D array, an HTML table, an ADO.Net DataTable

A few things you can use
(1) Use the string.split method to split a string into an array of substrings based on a delimter (first use "^" to get rows, and then use " " to get columns)
(2) You could also use regular expressions to split it
(3) The data is stored as an HTML table, if you're screen-scraping you could get that table instead

HTH
Tim Stal

----- ricky wrote: ----

hello
i'm using Server.CreateObject("MSXML2.XMLHTTP") to extract the data from http://fn.yam.com/exchange/ and data looks like 0.542 1.322 112.160 5.305 1.278 1.582 0.809 1.323 33.425
8.277 ?^? 1.844 - 2.438 206.840 9.785 1.863 2.918
1.492 ......, how can i arrange these data in tabular form? any ideas?
 
Back
Top