Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 18-04-2009
Avatar de JUANCBARRETO
JUANCBARRETO JUANCBARRETO is offline
Registrado
 
Registrado: mar 2007
Posts: 7
Poder: 0
JUANCBARRETO Va por buen camino
Abrir Txt En String Grid

ABRIR TXT EN STRING GRID SEPARADO POR ALGUN TIPO DE CARACTER COMO COMA U OTRO, EN ESTE CASO POR |

Procedure Tform1.CargaTabla(Ruta:String;Tabla:TStringgrid);
var Let : File of Char;
dat : char;
n,col,fil:integer;
s : string;
begin
n:=0;
col:=0;
fil:=0;
AssignFile(Let,Ruta);
Reset (Let);
while (n <= FileSize(Let)-1) do
begin
Seek(Let,n);
Read(Let, Dat);
if (dat <> '|') and (dat<>#13)and (dat<>#10) then
begin
s:=s+dat;
end;
if (dat = '|') OR (n = FileSize(Let)-1)OR (dat=#10) then
begin
s:=TRIM(s);
S:=StringReplace(s,'"','',[rfReplaceAll]);
tabla.Cells[col,fil]:=S;
col:=col+1;
s:='';
end;
if(dat=#10)then
begin
fil:=fil+1;
col:=0;
end;
tabla.ColWidths[0]:=150;
tabla.ColWidths[1]:=80;
n:=n+1;
end;
tabla.RowCount:=fil;
CloseFile(let);
end;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
no puedo abrir un archivo con ShellExecute si el archivo es variable belpab API de Windows 2 28-11-2007 16:24:22
STringGrid: cargar archivo previamente guardado. amadis OOP 4 01-05-2007 23:52:30
Abrir .INI en StringGrid Iskariote0087 Varios 3 04-08-2006 17:58:58
Abrir archivo Ivan_25 C++ Builder 8 09-11-2005 12:28:20
Exportar un StringGrid a un Archivo.TxT kokoyweb Varios 1 24-08-2004 22:04:26


La franja horaria es GMT +2. Ahora son las 16:24:43.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi