09-01-2016, 04:08 PM
GetTable does not give row and column numbers. Need to find the table element, get its rows etc, it's not very easy.
Partial example:
Macro Macro2765
Partial example:
Macro Macro2765
out
str html=
;<!DOCTYPE html>
;<html>
;<head>
;<style>
;table, th, td {
;;;;;border: 1px solid black;
;}
;</style>
;</head>
;<body>
;
;<table>
;;;<tr>
;;;;;<th>Month</th>
;;;;;<th>Savings</th>
;;;;;<th>Savings for holiday!</th>
;;;</tr>
;;;<tr>
;;;;;<td>January</td>
;;;;;<td>$100</td>
;;;;;<td rowspan="2">$50</td>
;;;</tr>
;;;<tr>
;;;;;<td>February</td>
;;;;;<td>$80</td>
;;;</tr>
;;;<tr>
;;;;;<td>March</td>
;;;;;<td>$90</td>
;;;;;<td>$70</td>
;;;</tr>
;</table>
;
;</body>
;</html>
HtmlDoc d.InitFromText(html)
MSHTML.IHTMLElement2 e=+d.GetHtmlElement("table" 0)
if(e=0) end "not found"
;out e.innerHTML
MSHTML.IHTMLElement2 ee
foreach ee e.getElementsByTagName("tr")
,out ee.getElementsByTagName("td").length