Follow the code that I developed along with my co-worker.
procedure TfrmGrid.Button1Click(Sender: TObject);
var
arq: TStringGrid;
txt: TextFile;
c, l, treg : integer;
lTemp: String;
begin
treg := 0;
c:=0;
l:=0;
AssignFile(txt, Label1.Caption);
Reset(txt);
while not eof(txt) do
begin
Readln(txt, lTemp);
if (copy(lTemp, 1, 3) = 'E14') or (copy(ltemp, 1, 3) = 'E15') then
inc(treg);
end;
while not eof(txt) do
begin
Readln(txt, lTemp);
if (copy(lTemp, 1, 3)= 'E14') then
c:= c+1;
copy(arq[c][l],1,3);
end;
CloseFile(txt);
ShowMessage('total de linhas: '+IntToStr(treg));
end;
What I need is only to show the lines that I rescued from TXT to report on TStringGrid
.
What would I be missing there?