|
-
Nov 6th, 2009, 04:45 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Parsing and getting Data from webbrowser TABLE
Is it possible to collect data in this page with table. link here
Is t possible to collect and view the data from tables into a ListView control in winForm?
Instead of viewing page in webbrowser. i just want to use listview.
I found klienma's thread in codebank but i could find a way how to parse table data form the web page.
Thanks for the help..
VB 6.0 = "Self-Study" Then
vb.NET = "Self-Study" Then
C# = 'on going study.....
-
Nov 6th, 2009, 09:34 AM
#2
Thread Starter
Hyperactive Member
Re: Parsing and getting Data from webbrowser TABLE
Hi, I am playing around with the codes I found here. Thanks mikeki
But my problem is it is using ListBox, I am trying to use listview.
My problem is data are adding in one column only on my listview.
Here is the code I am playing around
vb Code:
Private Sub DumpTables() Dim t, c As Integer ' Used to count tables and cells. Dim IWebDocument As HTMLDocument Dim IWebElements As IHTMLElementCollection Dim ITableElement As HTMLTable Dim ICellElement As HTMLTableCell ListBox1.Items.Clear() 'GET DOCUMENT IWebDocument = CType(wb.Document, HTMLDocument) 'GET TABLES IWebElements = IWebDocument.getElementsByTagName("TABLE") 'ListBox1.Items.Add("Length = " & IWebElements.length) ' Iterate through all the Tables on the web page. t = 0 For Each ITableElement In IWebElements ' Iterate through all the cells within a table. c = 0 For Each ICellElement In ITableElement.cells ListBox1.Items.Add("|--" & ICellElement.innerText & "--|") ListView1.Items.Add(ICellElement.innerText) c = c + 1 Next t = t + 1 Next End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load wb.Navigate("http://rushcodes.aybydinnovations.com/coderesult.php") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click DumpTables() End Sub
Here is my ListView layout
Last edited by dr_aybyd; Nov 6th, 2009 at 09:53 AM.
VB 6.0 = "Self-Study" Then
vb.NET = "Self-Study" Then
C# = 'on going study.....
-
Nov 6th, 2009, 06:53 PM
#3
Thread Starter
Hyperactive Member
Re: Parsing and getting Data from webbrowser TABLE
BUmp for my thread..I still can't figure it out using listview.
VB 6.0 = "Self-Study" Then
vb.NET = "Self-Study" Then
C# = 'on going study.....
-
Nov 7th, 2009, 01:26 AM
#4
Thread Starter
Hyperactive Member
Re: Parsing and getting Data from webbrowser TABLE
I tried this codes but still same result
Code:
ListView1.Items.Add(New ListViewItem(New String() {ICellElement.innerText}))
VB 6.0 = "Self-Study" Then
vb.NET = "Self-Study" Then
C# = 'on going study.....
-
Nov 7th, 2009, 10:09 AM
#5
Thread Starter
Hyperactive Member
Re: Parsing and getting Data from webbrowser TABLE
Can anyone suggest any help there?
VB 6.0 = "Self-Study" Then
vb.NET = "Self-Study" Then
C# = 'on going study.....
-
Nov 8th, 2009, 10:01 AM
#6
Addicted Member
Re: Parsing and getting Data from webbrowser TABLE
make a sample project and attach it to this tread so i can have a look.
Regards Me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|