Home > Software engineering >  About VB reading page table data
About VB reading page table data

Time:10-15

Read the web page form, content, whether can be read as EXCEL files, can be caused by vertical and horizontal orientation, such as A3, etc., reads the specified CELL?
Novice, thanks

CodePudding user response:

Not as number of EXCEL, or after you find a TABLE element, according to the general way to read his.childnodes attribute, either in the cells, reference the js code
 function numberCells () {
Var count=0;
for (i=0; I & lt; Document. All. Mytable. Rows. Length; I++) {
for (j=0; J & lt; Document. All. Mytable. Rows (I) cells. Length; J++) {
Document. All. Mytable. Rows (I) cells (j) the innerText=count;
count++;
}
}
}

CodePudding user response:

Quote: refer to 1st floor bcrun response:

Not as number of EXCEL, or after you find a TABLE element, according to the general way to read his.childnodes attribute, either in the cells, reference the js code
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Please comment, web page source code of the part is as follows:
















15:00 & lt;/td>

1.67 & lt;/td>
3.40 & lt;/td>

54.79% & lt;/td> 26.91% & lt;/td> 18.30% & lt;/td> 91.50% & lt;/td>

(248) & lt;/td>

1.57 & lt;/td> 3.50 & lt;/td> 6.00 & lt;/td> 58.47% & lt;/td> 26.23% & lt;/td> 15.30% & lt;/td> 91.80% & lt;/td>
Here, I think, according to the names of the home team, such as: central coast seafarers, to read it to two rows behind the data: the red part of the

Excuse me the easiest way to
Thank you very much!

CodePudding user response:

In fact this have the js code reference also didn't what to say, after is a coolie live, you must first find the id attribute to these tr's table, which is corresponding to the mytable, then find the tr, ah, the content of the TD in VB6 use webbrowser control with the web page, the corresponding is
Webbrowser1. Document. All. Mytable
  • Related