![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
||||
|
||||
|
Código:
public
{ Public declarations }
strlist : TStringList;
procedure TForm1.FormCreate(Sender: TObject);
begin
Strlist:= TStringList.Create;
end;
procedure TForm1.Abrir1Click(Sender: TObject);
begin
if (opendialog1.Execute) then
begin
strlist.LoadFromFile(opendialog1.FileName);
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
strlist.Free;
end;
procedure TForm1.actualizarStringGrid;
var I:integer;
temp: string;
begin
for I:=1 to StringGrid1.RowCount do
StringGrid1.Rows[i].clear;
for I:= 0 to (strlist.count)-1 do
begin
temp:= strlist.Strings[i];// Aca serian los primero 160 caracteres
StringGrid1.Cells[0,I+1]:= copy(temp,1,8); // en cada una de estas filas copias la parte que quieras de los 160
StringGrid1.Cells[1,I+1]:= copy(temp,9,8);
StringGrid1.Cells[2,I+1]:= copy(temp,17,4);
StringGrid1.Cells[3,I+1]:= copy(temp,21,1);
StringGrid1.Cells[4,I+1]:= copy(temp,22,10);
......
StringGrid1.RowCount:=StringGrid1.RowCount+1;
end;
end;
Última edición por juanlaplata fecha: 18-12-2007 a las 15:09:07. |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| como leer n caracteres de un archivo | manolop | Varios | 6 | 18-12-2007 22:50:06 |
| Saber cantidad de lineas que se van a leer de un fichero texto... | Lester | Varios | 4 | 04-04-2007 17:57:02 |
| Select y cantidad de caracteres | Walterdf | SQL | 8 | 28-07-2006 13:21:48 |
| mostrar el cantidad maxima de caracteres en un memo | Choclito | Varios | 1 | 03-05-2006 18:10:28 |
| Cantidad de caracteres en un edit | botones67 | Varios | 4 | 09-07-2003 11:55:54 |
|