AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi get number of rows and cols of a Table
Thema durchsuchen
Ansicht
Themen-Optionen

get number of rows and cols of a Table

Ein Thema von mr_fahrrad · begonnen am 9. Jan 2007 · letzter Beitrag vom 10. Jan 2007
Antwort Antwort
mr_fahrrad

Registriert seit: 28. Dez 2006
46 Beiträge
 
#1

get number of rows and cols of a Table

  Alt 9. Jan 2007, 23:18
Hi Again!

How I do that? if possible, in a selected table... I get the outerHtml and count the number of occourences of 'td' and 'tr', but is not a good method because merge cells..

I need a reference for commands of webbrowser (mshtml - ole), where I get it?
  Mit Zitat antworten Zitat
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, 06: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
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:45 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz