如何从网站表中获取哪些表不是唯一的数据?

时间:2016-02-25 07:54:35

标签: excel vba

我是新的VBA初学者,我想将表格的值复制到excel,但它失败并且在运行代码时出现运行时438错误。 有人可以告诉我如何解析数据并将数据复制到excel?

Dim ReplacementTable作为IHTMLElementCollection

设置ReplacementTable = IE.document.getElementById(“replacement2”)。getElementByTagClassName(“order-tables-premiuminfo”)。getElementByTagClassName(“tr”)(0)

            

<tbody><tr class="order-modified1">
<!-- 38456(Q3) Start  -->


    <td colspan="15">Line Details</td>

<!-- 38456(Q3) End  -->
</tr>
<tr class="order-modified-rows">
    <td style="border-width:0px 1px 1px 0px"><b> Line </b></td>
    <td><b> Line Ref</b></td>
    <td><b> Line Status</b></td>
    <td><b> Line Transaction Type</b>
    <span> <span> <input type="button" style="background: url(images/icon_help.gif);width:12px;height:12px;border:0;position:relative; 

             top:3px 

        " onclick="showBubblePopup(this,'false')" title="Line Transaction Type Help" id="lineTransHelp">
    </span> </span>
    <div style="display: none;" id="lineTransHelp-content">Describes the line and the local operating unit that will fulfill the shipment or receipt of parts.<br><br><a href="https://supportforums.cisco.com/docs/DOC-22754">Line Transaction Type Help</a></div>
    </td>
    <td><b> Parts# </b></td>
    <td><b> Description
    </b></td>
    <td><b> Ship </b></td>
    <td><b> Return </b></td>
    <td><b>Qty Auth</b></td>
    <!-- 38456(Q3) Start  -->

    <!-- 38456(Q3) End  -->
    <td><b>Shipped Serial ID</b></td>
    <td><b>Scheduled Ship Time</b></td>
    <td><b>Qty Shpd</b></td>
    <td><b>Ship Date</b></td>
    <td><b>Shipment Warehouse</b></td>
    <td><b>Dispatch Status </b></td>
</tr>   





        <tr class="order-modified-rows">
            <td style="border-width:0px 1px 0px 0px">5.1
            </td>

            <td width="8%">
            &nbsp;</td>

            <td width="6%">Fulfilled</td>
            <td>SORTF-US</td>
            <td>CPAK-100G-LR4=</td>
            <td>CPAK-100G-LR4 Transceiver module, 10km SMF</td>
            <td>

                    YES


            </td>
            <td>


                    NO

            </td>
            <td>1</td>
            <!-- 38456(Q3) Start  -->

          <!-- 38456(Q3) End  -->           
            <td width="14%">&nbsp;

                    <div>FBN20010104</div>

            </td>
            <td width="9%">
                <string:uppercase>
                    29-Jan-2016 06:41(GMT -6)
                </string:uppercase>

            </td>
            <td>1</td>
            <td width="9%">
                <string:uppercase>
                    29-Jan-2016 06:10(GMT -6)
                </string:uppercase>
            </td>
            <!--

            -->

               <td>U06</td>



            <!--      
            -->
            <td>DISPATCHED</td>
        </tr>


<tr class="order-modified-rows">
    <!-- Code Change for Usability Req 43-->
    <td style="border-width:0px 1px 0px 0px"></td>
    <td style="font-weight : bold;" colspan="3">Failure Class</td>
    <td style="font-weight : bold;" colspan="3">Failure Code</td>
    <td style="font-weight : bold;" colspan="3">Customer Reference Number</td>
    <!-- 38456(Q3) Start  -->


    <td colspan="5"><b>Customer PO Number</b></td>

    <!-- 38456(Q3) End  -->
</tr>



        <tr class="order-modified-rows">
            <td style="border-width:0px 1px 0px 0px"></td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">OF - Operational Failure</td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">OHW9 - HW Fail - Other</td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">&nbsp;</td>
            <td style="border-width:0px 1px 0px 1px" colspan="4">&nbsp;</td>
        </tr>







        <tr class="order-modified-rows">
            <td style="border-width:0px 1px 0px 0px"></td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">OF - Operational Failure</td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">OHW9 - HW Fail - Other</td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">&nbsp;</td>
            <td style="border-width:0px 1px 0px 1px" colspan="4">&nbsp;</td>
        </tr>







        <tr class="order-modified-rows">
            <td style="border-width:0px 1px 0px 0px"></td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">OF - Operational Failure</td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">OHW9 - HW Fail - Other</td>
            <td style="border-width:0px 1px 0px 1px" colspan="3">&nbsp;</td>
            <td style="border-width:0px 1px 0px 1px" colspan="4">&nbsp;</td>
        </tr>



</tbody></table>
    </td>

0 个答案:

没有答案