Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#2

Re: get number of rows and cols of a Table

  Alt 10. Jan 2007, 07:29
Hi,

you should find everything you look for and more on this site: WebBrowser Control

Delphi-Quellcode:
function RowCount(doc: IHTMLDocument2; table: Variant): Integer;
var
  e2: IHTMLElement2;
  ec: IHTMLElementCollection;
  tbl: IHTMLTable;
begin
  e2 := doc.body as IHTMLElement2;
  ec := e2.getElementsByTagName('table');
  tbl := ec.item(table, null) as IHTMLTable;
  if Assigned(tbl)
    then Result := tbl.rows.length
    else Result := 0;
end;
Regards
  Mit Zitat antworten Zitat