Ver Mensaje Individual
  #7  
Antiguo 22-06-2015
wolfran_hack wolfran_hack is offline
Miembro
 
Registrado: abr 2013
Posts: 97
Reputación: 12
wolfran_hack Va por buen camino
ahora probe de agregar unos datos y cerrar y se guardar el archivo con tu código, por ende lo que creo es que el error debe estar entre:

Código Delphi [-]
(* this procedure loads the content of a CSV file *)
(* to a TListView      *)
procedure ListViewFromCSV(
          theListView: TListView;
          const FileName: String);
var item: TListItem;
    index,
    comPos,
    subIndex: Integer;
    theFile: TStringList;
    Line: String;
begin
     theFile := TStringList.Create;
     theFile.LoadFromFile(FileName);
     for index := 0 to theFile.Count -1 do begin
         Line := theFile[index];
         item := theListView.Items.Add;
         comPos := Pos(';', Line);
         item.Caption := Copy(Line, 1, comPos -1);
         Delete(Line, 1, comPos);

         comPos := Pos(';', Line);

         while comPos > 0 do begin
               item.SubItems.Add(Copy(Line, 1, comPos -1));
               Delete(Line, 1, comPos);
               comPos := Pos(';', Line);
         end;

         item.SubItems.Add(Line);
     end;

     FreeAndNil(theFile);
end;

y

Código Delphi [-]
procedure TForm1.CargarArchivoCSV1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
    begin
        ListViewFromCSV(ListView1, OpenDialog1.FileName);
    end;
    SaveListView(ListView1, 'archivo.database', ListView1.Name);
end;
Responder Con Cita