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
[-]
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;