Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Routines to parse html tables in vfp
Message
From
28/03/2001 16:57:34
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00489286
Message ID:
00489660
Views:
9
>I need to parse the cells of an html table and save them in a VFP table(dbf).
>
>I think the html type lib has routines for this but I don't find any documentation for it.
>
>Has anyone had luck with this. I guess I can write my own but I would prefer to use something tried and tested if possible. This is a free project I am doing as a favor for someone and want to finish asap without having to reinvent the wheel.
>

This should be fairly straightforward by automating IE:

oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("Someplace.com/somefile.htm")
oTable = oIE.Document.Body.all("mytable") &&assuming the table has an id or name assigned
FOR EACH oRow IN oTable.Rows
FOR EACH oCell IN oRow.Cells
?oCell.InnerText
ENDFOR
ENDFOR

If the table has no id assigned, you'll have to iterate through the all collection to find which element is the table you're looking for.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform