Ver Mensaje Individual
  #3  
Antiguo 03-11-2004
Caracolg Caracolg is offline
Registrado
 
Registrado: oct 2004
Posts: 9
Reputación: 0
Caracolg Va por buen camino
Este es el código que utilze.

procedure TForm3.BitBtn2Click(Sender: TObject);
Var
Excel,hoja: Variant;
begin
DM.Table2.Active:=False;
If FileExists('tempo.xls') Then DeleteFile('tempo.xls');
if FileExists('tempo.dbf') Then DeleteFile('tempo.dbf');
DM.Table2.BatchMove(dm.Query2,batcopy);
DM.Table2.Active:=True;
CopyFileTo('tempo.dbf','tempo.xls');
DM.Table2.Active:=False;
if not VarIsEmpty(Excel) then
Excel.Quit;
Excel:= CreateOleObject('Excel.Application');
Excel.Visible := True;
Excel.Workbooks.Open(GetCurrentdir+'\'+'tempo.xls',1);
end;

Pero no me gusta el formato en que lo pasa a Excel. Espero puedan ayudarme. Muchas gracias. De verdad les agradezco

Última edición por Caracolg fecha: 03-11-2004 a las 21:45:51.
Responder Con Cita