Get Data from HTML File ?
Hello,
i want to extract data from html file, and than save to SQL Database use vb6
this my data in html file:
data.html
Code:
<html>
....
<table>
<tr><td>Product Name</td><td>Price</td><td>Qty.Sales</td></tr>
<tr>
<td>Shoes</td><td>200</td><td>5</td>
</tr>
<tr>
<td>Windows XP</td><td>300</td><td>4</td>
</tr>
</table>
....
</html>
and i want to get data, like this:
Code:
product name price qty.sales
---------------------------------
Shoes 200 5
Windows XP 300 4
anyone know how to do this ?
thank you
Re: Get Data from HTML File ?
ok solved, i used:
vb Code:
i = 0
itable = 0
sfile = "d:/data.html"
Open sfile For Input As #intD
Do Until EOF(intD)
Input #intD, strTemp
If InStr(1, strTemp, "<!--") Then GoTo skip
If InStr(1, strTemp, "<table>") Then
itable = itable + 1
End If