lcFile = Sys(5)+Curdir()+"Absorb_2005new.xls" oExcel=Createobject("Excel.Application") With oExcel .DisplayAlerts= .F. .WorkBooks.Open(m.lcFile,0) .Sheets("Buffing").Select() Do PopulateExcelArray .ActiveWorkbook.Close(.T.) .Quit Endwith Procedure PopulateExcelArray Do ProvideDesc Procedure ProvideDesc Do UpdateSpreadsheet Procedure UpdateSpreadsheet sRowId = "5" sC = 75 sH = 80 sK = 90 sT = 100 sAB = 120 sAd = 140 sAe = 150 With oExcel.ActiveWorkbook.WorkSheets("Buffing") If !Empty(sa) cCell="A"+sRowId .Range(cCell).Select() .Range(cCell).Value= Date(1990,01,01)&& CTOD(sA) Endif * The s-CELL Values are all numeric at this point If sC > 0 cCell="C"+sRowId .Range(cCell).Select() .Range(cCell).Value= sC Endif If sH> 0 cCell="H"+sRowId .Range(cCell).Select() .Range(cCell).Value= sH Endif If sK> 0 cCell="K"+sRowId .Range(cCell).Select() .Range(cCell).Value= sK Endif If sT> 0 cCell="T"+sRowId .Range(cCell).Select() .Range(cCell).Value= sT Endif If sAB> 0 cCell="AB"+sRowId .Range(cCell).Select() .Range(cCell).Value= sAB Endif If sAd> 0 cCell="AD"+sRowId .Range(cCell).Select() .Range(cCell).Value= sAd Endif If sAe> 0 cCell="AE"+sRowId .Range(cCell).Select() .Range(cCell).Value= sAe Endif EndwithCetin