select * from sati where &lcCondition; into curs zz set mark to "-" ?date() set date dmy _outtext="" #define tab chr(9) #define cr chr(13) set mark to "-" set point to set separ to scan _outtext=_outtext+ trim(radnik) +tab _outtext=_outtext+ trim(r_n) +tab _outtext=_outtext+ dtoc(datum) +tab _outtext=_outtext+ str(od_sati, 5,2) +tab _outtext=_outtext+ str(do_sati, 5,2) +tab _outtext=_outtext+ alltr(str(user, 5)) +tab _outtext=_outtext+ " " +tab _outtext=_outtext+ alltr(projekt) +tab _outtext=_outtext+ " " +tab _outtext=_outtext+ " " +tab && these fields need to contain formulae from previous rows _outtext=_outtext+ " " +tab _outtext=_outtext+ " " +tab _outtext=_outtext+ trim(status)+tab _outtext=_outtext+ mline(napomena,1)+cr ends _cliptext=_outtext x=getfile("xls") public oExcel oExcel=createobject("Excel.Application") oExcel.Workbooks.open(x) with oExcel .visible=.t. .workbooks(1).activate .range("B1").select .selection.end(-4121).select .activewindow.activecell.Offset(1, 0).Activate .ActiveSheet.Paste oexcel.activeworkbook.close(1) endwith release oexcelIt works just fine, and (except for an eternity and a half, which is the time for Excel to load) quick. Now the next trouble is that I don't know where I am. I'd like to copy the formulae from previous rows in certain columns, and I've recorded the macro to do it, and it'd all be fine - but how do I get the row and column position where I was before I pasted? All the ranges in the macro are welded in. After several hours of wading through the object browser and Excel VBA help, I feel somewhat dizzy and don't know where next to look. I felt almost lucky that the power went out (and more lucky now when I discovered I don't have to reinstall anything :), so I could delegate the problem to the next day.