Full Version: Html Table Output To Vba Array Via Xmlhttp.responsetext
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
kruuth
I have a large, very large amount of data coming in from a xmlhttp.responseText call. It looks like this:

CODE
<body><table BORDER='1' CELLSPACING='0' style='font-family: Arial; font-size: 8pt'><tr><td>ORDER</td><td>SERIAL</td><td>ID</td><td>STATE</td><td>CITY</td><td>ZIP</td></tr></table></body>


I'm new to this, is there a way to take this output and convert it into a 2d array or something? The output could go as long as 500k lines.
norie
You'll have to create code to parse the text.
kruuth
That's what I thought...but I'm not too sure how to do that. Can I dump it into a string or variant or something? I thought strings could only be so long.
norie
You could dump into into a string as long as it has less then 2 billion characters.

How did you get the text anyway?
kruuth
The text is coming in from xmlhttp.responseText I tried splitting it to a variant array but I get "Object variable or with block variable not set" when I use this:

CODE
Dim linevar() As Variant
Dim splitonval As String
splitonval = "</tr>"
linevar = Split(xmlhttp.responseText, splitonval)


norie
That isn't how you would declare linevar, you declare it like this.
CODE
Dim linevar As Variant
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.