Delphi-Quellcode:
procedure TForm1.ExportFunktion13Click(Sender: TObject);
var aNode,aNode2 : Olevariant;
r,c,z,z2 : Integer;
begin
aNode := WebBrowser1.OleObject.Document.all.tags('intraLC').Item(5);
r := aNode.all.tags('tr').Length;//Zeilen feststellen
StringGrid1.RowCount := r;
for z := 0 to r-1 do
begin
aNode2 := aNode.all.tags('tr').Item(z);
c := aNode2.all.tags('th').Length;
if c > 0 then
begin
if c > StringGrid1.ColCount then
StringGrid1.ColCount := c;
for z2 := 0 to c-1 do
StringGrid1.Cells[z2,z] := aNode2.all.tags('th').Item(z2).innerText;
end;
c := aNode2.all.tags('td').Length;
if c > 0 then
begin
if c > StringGrid1.ColCount then
StringGrid1.ColCount := c;
for z2 := 0 to c-1 do
StringGrid1.Cells[z2,z] := aNode2.all.tags('td').Item(z2).innerText;
end;
end;
end;
So hier das ganze mal in schön