procedure TForm1.Open_ActionExecute(Sender: TObject); var s:string; i:integer; TmpStringList: TStringList; begin if OpenDialog1.Execute then begin i := 1; TmpStringList := TStringList.Create; AssignFile(fopen, OpenDialog1.FileName); Reset(fopen); try while not SeekEof(fopen) do begin ReadLn(fopen, s); TmpStringList.CommaText := s; StringGrid1.RowCount := i + 1; StringGrid1.Rows[i].Assign(TmpStringList); if i > StringGrid1.Row then StringGrid1.RowCount:=StringGrid1.RowCount+1; Inc(i); end; finally TmpStringList.Free; CloseFile(fopen); end; end; end;