倒出:
var
txtF: TextFile;
begin
AssignFile(txtF, SaveDialog.FileName);
Rewrite(txtF);
if ioresult <> 0 then ;
Writeln(txtF, 'abcdefghijklmnopqrstuvwxyz');
Table1.DisableControls;
Table1.Open;
Table1.First;
while not Table1.Eof do
begin
Writeln(txtF, Table1.FieldByName('name').AsString + ',' +
Table1.FieldByName('Field1').AsString + ',' +
Table1.FieldByName('Field2').AsString + ',' +
.....
Table1.FieldByName('FieldN').AsString);
Table1.Next;
end;
Table1.First;
Table1.EnableControls;
CloseFile(txtF);
end;
倒入也差不多,只不过要计算出每一行的","的位置,然后把相应的值赋给相应的字
段!