Ver Mensaje Individual
  #2  
Antiguo 03-11-2008
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.738
Reputación: 24
ContraVeneno Va por buen camino
Código Delphi [-]
  Excel:=CreateOleObject('Excel.Application');
  Excel.Visible := False;
  Excel.DisplayAlerts:= False;
  Excel.WorkBooks.Add;
  Excel.WorkBooks[1].WorkSheets[1].Name := 'Libro';
  Libro := Excel.WorkBooks[1].WorkSheets['Libro'];
  Libro.Cells[1,1]:='Reporte';
  Libro.Cells[4,1].Font.Bold:=True;
  Libro.Columns.Columns[2].ColumnWidth := 50;
  with UnQuery do begin
   first;
   Libro.Cells[i,1]:=FieldByname('UnCampo').AsString;
   Libro.Cells[i,1].Font.Bold:=True;   
   while not EOF Do begin
      Libro.Cells[i,1]:=FieldByName('OtroCampo').AsString;
      .....
      Next;
   end; //while
end; //with
__________________

Responder Con Cita