Here goes an example: ( u should look up CONNECTTONEWOBJECT )
Regards.
datastore lds_control, lds_detalle
integer li_resultado
long ll_fila = 10, ll_total, i, j, ll_totdet
string ls_ente, ls_monant, ls_moneda
OLEObject lobjExcel
lobjExcel = CREATE OLEObject
li_resultado =...