还可以直接创建:
var
txt:tstrings;
i:integer;
x:string;
begin
txt:=tstringlist.create;
with table1 do
begin
while not eof do
begin
x:='';
for i:=0 to fieldcount-1 do
x:=x+field.asstring+#39; //#39 is tab??? forgot:-(
txt.add(x);
next;
end;
end;
txt.savetofile('test.txt');