Ver Mensaje Individual
  #4  
Antiguo 16-03-2007
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
No sé, mil registros no se me hace mucho. Pero, como te decía, puedes optar por algo así:

Código Delphi [-]
var
  Archivo: TextFile;
  Linea: String;
  sl: TStringList;
  j: Integer;

begin
  AssignFile(Archivo, 'archivo.csv');
  Reset(Archivo);

  sl := TStringList.Create;
  
  try
    while not EoF(Archivo) do
    begin
      ReadLn(Archivo, Linea);
      sl.CommaText := Linea;
      
      Table.Append;

      for j := 0 to sl.Count - 1 do
        Table.Fields[j].Value := sl[j];

      Table.Post;
    end;
  finally
    sl.Free;
  end;

  CloseFile(Archivo);
end;

// Saludos
Responder Con Cita