![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
|
|
#1
|
|||
|
|||
|
Quise decir donde pongo ese código para que en la exportación figuren los nombres de las columnas. Esa propiedad la conozco, tan novata no soy!!!
Yanina |
|
#2
|
||||
|
||||
|
_________________________________
![]()
__________________
|
|
#3
|
|||
|
|||
|
Jajaja, no llores hijo, ahora me voy a poner a resolverlo porque ya vine de comer y me volviò a andar el cerebro. Es muy facil, en un ratito lo publico.
Yanina |
|
#4
|
|||
|
|||
|
Gracias Delphi.com.ar por tu ayuda, aca publico el còdigo que me mandaste un poco modificado:
Código:
procedure DataSetToStream(ADataSet: TDataSet; AStream: TStream); var i: Integer; S: string; begin if not ADataSet.IsEmpty then begin S := ''; ADataSet.EnableControls; try for i := 0 to ADataSet.Fields.Count -1 do begin if (i = ADataSet.Fields.Count -1) then S := S + ADataSet.fields[i].FieldName + #13#10 else S := S + ADataSet.fields[i].FieldName + ';'; end; AStream.Write(S[1], Length(S)); ADataSet.First; repeat S := ''; for i := 0 to ADataSet.Fields.Count -1 do if ADataSet.Fields[i].Visible then begin if (i = ADataSet.Fields.Count -1) then S := S + ADataSet.Fields[i].DisplayText + #13#10 else S := S + ADataSet.Fields[i].DisplayText + ';'; end; AStream.Write(S[1], Length(S)); ADataSet.Next; until ADataSet.Eof; finally ADataSet.DisableControls; end; end; end; Yanina Genia |
|
#5
|
||||
|
||||
|
Cita:
Un saludo |
|
#6
|
||||
|
||||
|
oops.. no me di cuenta que había más mensajes en el hilo y que YaninaGenia ya había dado con una solución
Un saludo |
![]() |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
|