#include c:\reports\others\xl97cons.h #define xltrue -1 #define xlfalse 0 local oexcel, osheet oexcel = createobject("Excel.Application") oexcel.visible = 0 && for debugging oexcel.workbooks.open("c:\exc\test.xls") osheet = oexcel.activesheet nline=2 select t2 scan nline=nline+1 iyear=int(t2.year) icount=int(t2.count) iall=int(t2.all) osheet.cells(nline,2).value =iyear osheet.cells(nline,3).value = icount osheet.cells(nline,4).value = iall endscan oexcel.visible = -1 && for debugging osheet.parent.saved = xltrueThanks