begin
st := TStringList.Create;
try
Table1.First;
while not Table1.Eofdo
begin
sRec := '';
for I := 0 to Table1.FieldDefs.Count - 1do
begin
iSize := 10;
if Table1.FieldDefs.DataType in sizeType then
iSize := Table1.FieldDefs.Size;
sField := Copy(Trim(Table1.Fields.AsString) + StringOfChar(' ', iSize), 0, iSize);
sRec := sRec + sField+' ';
end;
st.Add(sRec);
Table1.Next;
end;
st.SaveToFile(FileName);
finally
st.Free;
end;
end;