I have some HTML source that i get from a website for option quotes. (please see below)
What is the best way to extract the various text values in tr and store in a collection based on the strike price (4700 in this case available in the mid td 4700.00)
Some people recommend regex while other suggest to use a html parser. I'm doing this in VBA so whats the best way?
<!--<td><a href="javascript:popup1('','','1')">Quote</a></td>
<td><a href="javascript:popup1('','','','','CE')"><img src="/images/print3.gif"></a>
</td>-->
<td><a href="javascript:chartPopup('NIFTY', 'OPTIDX', '25JAN2012', '4700.00','CE','S&P CNX NIFTY');"><img src="/live_market/resources/images/grficon.gif" /></a></td>
<td class="ylwbg"> 2,935,500</td>
<td class="ylwbg"> 27,550</td>
<td class="ylwbg"> 12,458</td>
<td class="ylwbg"> 23.79</td>
<!-- End-->
<td class="ylwbg">
<a href="/live_market/dynaContent/live_watch/get_quote/GetQuoteFO.jsp?underlying=NIFTY&instrument=OPTIDX&strike=4700.00&type=CE&expiry=25JAN2012" target="_blank"> 139.25</a>
</td>
<!--*Net Change*-->
<td class="ylwbg" Style="color:Red;"> -7.35</td>
<td class="ylwbg"> 200</td>
<td class="ylwbg"> 139.15</td>
<td class="ylwbg"> 142.45</td>
<td class="ylwbg"> 200</td>
<td class="grybg"><a href="/live_market/dynaContent/live_watch/option_chain/optionDates.jsp?symbol=NIFTY&instrument=OPTIDX&strike=4700.00"><b>4700.00</b></a></td>
<td class="nobg"> 1,300</td>
<td class="nobg"> 76.00</td>
<td class="nobg"> 79.00</td>
<td class="nobg"> 1,350</td>
<!--*Net Change*-->
<td class="nobg" Style="color:Red;"> -1.55</td>
<td class="nobg">
<!-- <a href="javascript:popup1('NIFTY','OPTIDX','25JAN2012','4700.00','PE')"> 76.00</a> -->
<a href="/live_market/dynaContent/live_watch/get_quote/GetQuoteFO.jsp?underlying=NIFTY&instrument=OPTIDX&strike=4700.00&type=PE&expiry=25JAN2012" target="_blank"> 76.00</a>
</td>
<td class="nobg"> 26.33</td>
<td class="nobg"> 32,772</td>
<td class="nobg"> 103,700</td>
<td class="nobg"> 5,123,300</td>
<td><a href="javascript:chartPopup('NIFTY', 'OPTIDX', '25JAN2012', '4700.00','PE','S&P CNX NIFTY');"><img src="/live_market/resources/images/grficon.gif" /></a></td>
<!--<td><a href="javascript:popup1('','','1')">Quote</a></td>
<td><a href="javascript:popup1('','','','','PE')"><img src="/images/print3.gif"></a></td>-->
</tr>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…