procedure TfrmImportacaoSPED.LoadArquivo;
var
txt: TextFile;
line: String;
posicao: Integer;
flag: Boolean;
begin
flag := False;
AssignFile(txt, edtPath.Text);
Reset(txt);
if fArq = nil then
fArq := TStringList.Create
else
fArq.Clear;
fArq.BeginUpdate;
while not Eof(txt) do
begin
ReadLn(txt, line);
if True then
if (pos('|C460|', line)) <> 0 then
begin
fArq.Add(line);
flag := True;
end
else
begin
if flag = True then
fArq.Add(line);
end;
end;
CloseFile(txt);
fArq.EndUpdate;
mmo1.Text := fArq.Text;
FreeAndNil(fArq);
end;
Funcionou para o que estou pensando em fazer. Muito obrigado pessoal.
Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.