Receive table content by Webbrowser?

Asked

Viewed 90 times

1

I have the following table.

<table class="table1">
            <tbody>
                <tr>
                    <th></th>
                    <th>SEQ</th>
                    <th>LOGIN</th>
                    <th>WHATSAPP</th>
                    <th>E-MAIL</th>
                </tr>
                <tr>
                    <td><a href="http://www.google.com/">1</a></td>
                    <td><a href="http://www.google.com/"></a></td>
                    <td><a href="http://www.google.com/">name</a></td>
                    <td><a href="http://www.google.com/">99 999999999</a></td>
                    <td><a href="http://www.google.com/">[email protected]</a></td>
                </tr>
            </tbody>
        </table>

I would like to know how to get content from each TR to record in the Access Database.

Because so far I’ve only managed to get to this code.

Dim PageElement As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("table")
        For Each CurElement As HtmlElement In PageElement
            If (CurElement.GetAttribute("className") = "table1") Then
                TextBox1.Text = CurElement.InnerHtml

            End If
        Next
  • Try to use class instead of className.

  • 1

    @Nottherealhemingway He is returning right, my question is how to separate and take only the data within the TD, example, as I take the emails. for there are several.

  • Yeah! The penny Finally Dropped!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.