an Example...
OLEObject lobjExcel
lobjExcel = CREATE OLEObject
li_resultado = lobjExcel.ConnectToNewObject( "excel.application"

if li_resultado <> 0 then goto fallo
lobjExcel.WorkBooks.Add
lobjExcel.Columns("E:E"

.ColumnWidth = 15
lobjExcel.Columns("F:F"

.ColumnWidth = 30
lobjExcel.Columns("G:G"

.ColumnWidth = 14
lds_control = create datastore
lds_control.dataobject = "ds_ba_autorizacion_de_pago"
lds_control.settransobject(sqlca)
lds_detalle = create datastore
lds_detalle .dataobject = "ds_ba_autorizacion_de_pago_det"
lds_detalle .settransobject(sqlca)
ll_total = lds_control.retrieve(as_empresa, as_ente)
for i = 1 to ll_total
ls_ente = lds_control.getitemstring(i, "cod_ente"

lobjExcel.Activesheet.Cells(ll_fila, 2).Value = lds_control.getitemstring(i, "nom_cliente"
ll_totdet = lds_detalle.retrieve(as_empresa, ls_ente, gnvuo_sesion.event eu_obtener_oficina(), gnvuo_sesion.event eu_obtener_usuario(), "9", adt_inicio, adt_final )
for j = 1 to ll_totdet
ll_fila ++
if j <> 1 then
ls_monant = ls_moneda
end if
ls_moneda = lds_detalle.getitemstring(j , "des_moneda"
if ls_moneda <> ls_monant then
lobjExcel.Activesheet.Cells(ll_fila, 3).Value = "Moneda"
lobjExcel.Activesheet.Cells(ll_fila, 4).Value = ls_moneda
ll_fila ++
lobjExcel.Activesheet.Cells(ll_fila, 3).Value = "Cuenta"
lobjExcel.Activesheet.Cells(ll_fila, 4).Value = "No Cheque"
lobjExcel.Activesheet.Cells(ll_fila, 5).Value = "Fec.Impresión"
lobjExcel.Activesheet.Cells(ll_fila, 6).Value = "Beneficiario"
lobjExcel.Activesheet.Cells(ll_fila, 7).Value = "Mto Cheque"
//lobjExcel.Activesheet.Cells(ll_fila, 7).Style = "Currency"
//lobjExcel.Activesheet.Cells(ll_fila, 7).NumberFormat = "#,##0.00"
lobjExcel.Activesheet.Range("C" + string(ll_fila) + ":G" + string(ll_fila)).Font.Bold = true
ll_fila ++
end if