HTML Table to VB.Net DataGrid

NID

Newcomer
Joined
Aug 14, 2003
Messages
2
Hi everyone I have html table from which somehow I need to read data in to VB.Net DataGrid.
What would be the best solution for me. The HTML Table looks like this:

<TABLE WIDTH=80% BORDER=0 CELLPADDING=1 CELLSPACING=0>
<THEAD>
<TR BGCOLOR=#ebebff ALIGN=RIGHT>
<TH> </TH>
<TH ALIGN=left><U>Date</U></TH>
<TH> </TH>
<TH><U>Peak quota</U></TH>
<TH><U>Bliinkzone</U></TH>
<TH><U>Bliinktime quota</U></TH>
<TH><U>Total</U></TH>
<TH> </TH>
</TR>
</THEAD>
<TBODY>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030713&username=dimae>13-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030714&username=dimae>14-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030715&username=dimae>15-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030716&username=dimae>16-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030717&username=dimae>17-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030718&username=dimae>18-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030719&username=dimae>19-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030720&username=dimae>20-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030721&username=dimae>21-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030722&username=dimae>22-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030723&username=dimae>23-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030724&username=dimae>24-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030725&username=dimae>25-07-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030726&username=dimae>26-07-2003</A></TD>
<TD> </TD>
<TD>13.09</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>13.09</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030727&username=dimae>27-07-2003</A></TD>
<TD> </TD>
<TD>98.64</TD>
<TD>0.00</TD>
<TD>64.20</TD>
<TD>162.84</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030728&username=dimae>28-07-2003</A></TD>
<TD> </TD>
<TD>377.28</TD>
<TD>0.00</TD>
<TD>10.42</TD>
<TD>387.70</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030729&username=dimae>29-07-2003</A></TD>
<TD> </TD>
<TD>319.44</TD>
<TD>0.00</TD>
<TD>185.57</TD>
<TD>505.01</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030730&username=dimae>30-07-2003</A></TD>
<TD> </TD>
<TD>481.65</TD>
<TD>0.00</TD>
<TD>31.83</TD>
<TD>513.48</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030731&username=dimae>31-07-2003</A></TD>
<TD> </TD>
<TD>356.81</TD>
<TD>0.00</TD>
<TD>266.57</TD>
<TD>623.38</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030801&username=dimae>01-08-2003</A></TD>
<TD> </TD>
<TD>9.79</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>9.80</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030802&username=dimae>02-08-2003</A></TD>
<TD> </TD>
<TD>4.92</TD>
<TD>0.00</TD>
<TD>0.21</TD>
<TD>5.13</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=f5f5f5 ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030803&username=dimae>03-08-2003</A></TD>
<TD> </TD>
<TD>132.40</TD>
<TD>0.00</TD>
<TD>0.16</TD>
<TD>132.57</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030804&username=dimae>04-08-2003</A></TD>
<TD> </TD>
<TD>16.73</TD>
<TD>0.00</TD>
<TD>0.05</TD>
<TD>16.78</TD>
<TD> </TD>
</TR>
<TR BGCOLOR=ffffff ALIGN=right>
<TD> </TD>
<TD ALIGN=left><A HREF=volumegraphs.cgi?action=showday&period=20030812&username=dimae>12-08-2003</A></TD>
<TD> </TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD>0.00</TD>
<TD> </TD>
</TR>
<TR ALIGN=right BGCOLOR=#ebebff>
<TD> </TD>
<TD ALIGN=left><B>Total</B></TD>
<TD><B> </TD>
<TD><B>2571.44</B></TD>
<TD><B>364.32</B></TD>
<TD><B>894.37</B></TD>
<TD><B>3830.13</B></TD>
</TBODY>
</TABLE>
 
You can parse the file and load an array or a dataview, and perhaps for each item in the TH tags create the header for each datagrid column.

Once the content resides in an array you can Bind it to the datagrid.
 
Back
Top