Sin saber cual es tu problema creo haber visto un posible error:
Creo que te falta incrementar la variable i cuando recorres el detalle.
Código Delphi
[-]
procedure TForm_requerimiento.btn2Click(Sender: TObject);
var Excel,libro:Variant;
i,i_det:Integer;
begin
Excel:=CreateOleObject('Excel.Application');
Excel.WorkBooks.Add (-4167);
Excel.WorkBooks[1].WorkSheets[1].Name := 'Reporte';
Libro := Excel.WorkBooks[1].WorkSheets['Reporte'];
i := 1;
Libro.Cells [i,1] := 'Licitación';
Libro.Cells [i,2] := 'Zona';
Libro.Cells [i,3] := 'Gpo';
Libro.Cells [i,4] := 'Gen';
Libro.Cells [i,5] := 'Esp';
Libro.Cells [i,6] := 'dif';
Libro.Cells [i,7] := 'Var';
with Qry_resumen do
begin
First;
while not Qry_resumen.Eof do
begin
i:=i+1;
Libro.Cells [i,1] :=Qry_resumen.FieldByName ('licitacion').AsString;
Libro.Cells [i,2] :=Qry_resumen.FieldByName ('zona').AsString;
libro.Cells [i,3] :=Qry_resumen.FieldByName ('gpo').AsString;
Libro.Cells [i,4] :=Qry_resumen.FieldByName ('gen').AsString;
Libro.Cells [i,5] :=Qry_resumen.FieldByName ('esp').AsString;
Libro.Cells [i,6] :=Qry_resumen.FieldByName ('dif').AsString;
Libro.Cells [i,7] :=Qry_resumen.FieldByName ('var').AsString;
with Qry_detalle do
begin
First;
while not Qry_detalle.Eof do
begin
i:=i+1;
Libro.Cells [i,1] :=Qry_detalle.FieldByName ('licitante').AsString;
Next;
end;
end;
Next;
end;
Excel.visible:=True;
end;