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