Oder Einfach eine Textdatei:
Delphi-Quellcode:
//------------- SPEICHERN ----------------
procedure TForm1.Button4Click(Sender: TObject);
var
i,y :integer;
list : TStringlist;
begin
list := TStringlist.Create;
for i:=0 to stringgrid1.colcount-1 do
begin
for y := 0 to stringgrid1.RowCount-1 do
begin
list.Add(stringgrid1.Cells[i,y]);
end;
end;
list.SaveToFile('C:\Strings.txt');
list.Free;
end;
//-------- LADEN ---------
procedure TForm1.Button5Click(Sender: TObject);
var
i,y :integer;
ffile:textfile;
st:string;
begin
assignfile(ffile,'C:\Strings.txt');
reset (ffile);
for i:=0 to stringgrid1.colcount-1 do
begin
for y := 0 to stringgrid1.RowCount-1 do
begin
readln(ffile,st);
stringgrid1.cols[i].add(st);
end;
end;
closefile(ffile);
end;