Get Data From Table

abbaddon223

Registered User.
Local time
Yesterday, 16:36
Joined
Mar 13, 2010
Messages
162
Hi,

No one seems to have an answer on this so I'm hoping there is a guru out there.

I'm using Access VBA to get data from a website using the Element ID. All fine.

However, when results are displayed in a table, I'm stuck - Grrrrrr :mad:

Example of what I want to get below:

width="12" alt="Superfast fibre optic broadband" class="PE_tipLink" title="Superfast fibre optic broadband" />

<span class="PE_tipText">
<span class="tipInner">Great news! Removed </span>
</span>
</span>
</th>
<td>49.7Mb download<br/>10.9Mb upload</td>
<td><span class="now">Now</span></td>
<td class="tableButton"><a href="/consumerProducts/displayTopic.do?topicId=25633&Removed=yes" class="btnSwap24 learnMoreTarget learnMore_fttc_now_button" target="_top"><span class="hidden">Learn more </span></a></td>
</tr>

In bold are the bits I want - how on earth do I get Access to reference them?? Thanks for any help.

Yours, stuck and frustrated :(

 
When parsing text you need to find a pattern and then use the markers of that pattern to guide your programming.

From what I see you want to find the next '<td>' tag in your data, extract out a substring from that tag until the next '</td>' tag, see if in that substring you can find a '<br/>' tag and if so, extract the data you need using the '<td>', '<br/>' and '</td>' tags as starting and ending points for finding the data you want.

You are going to need to use the Mid (http://www.techonthenet.com/access/functions/string/mid.php) and InStr (http://www.techonthenet.com/access/functions/string/instr.php) functions
 

Users who are viewing this thread

Back
Top Bottom