Re: Exporting Data


Posted by Ulrich Becker on October 24, 2000 at 16:38:00:

In Reply to: Exporting Data posted by samir riric on October 20, 2000 at 08:06:58:

If you need a ascii csv fiele use this code:

procedure TForm1.Button1Click(Sender: TObject);
var n : integer;
s : String;
tf : textfile;

begin
AssignFile (tf,'my.csv');
rewrite (tf);
table1.Active := true;
while not table1.EOF do
begin
for n := 0 to table1.FieldCount - 1 do
begin
s := table1.fields[n].asString;
write (tf, s + ';');
end;
writeln (tf,#13);
table1.Next;
end;
end;

end.




Related Articles and Replies: