View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Parsing a string into an array?

split() on the semicolon and then loop through the array and use split (on
"=") on each value.
Take the second value from that operation and put it in an array (or use it
directly).

There's no way to donload "part" of a page (at least with respect to the
main HTML content: linked content such as images etc are "extra")

Tim



"Dave F." wrote in message
...
Hi
I'm using HTTPRequest to download a page of stock prices from ADVFN.

The part I want is of the format:
prices[1]=25.25;prices[2]=2.15;prices[3]=100.5; etc...

As you can see it's already passing it to an array within the page
functions, but is downloaded as a string.

Any ideas how can I parse this info into an array in VBA?

I can split using the semi colon but not sure how to get the rest into the
array.

On a more general note, Does anyone know if there's a better way to obtain
parts of a web page data without downloading it all & have to strip out
the bits I want?

Thanks in advance

Dave F.