TRY oExcel=CREATEOBJECT("Excel.Application") oExcel.Workbooks.Open(lcFileNameWithPath,.F.,.T.) CATCH TO oErr MESSAGEBOX("Error: "+ALLTRIM(oErr.message),0+64+0,_screen.Caption) ENDTRY FOR lnRow=1 TO lnExcelRows FOR lnColumn=1 TO lnExcelColumns TRY IF lnColumn<=26 && Single letter column lcExcelColumn=CHR(64+lnColumn) ELSE && double letter column starting with "A" lcExcelColumn="A"+CHR(64+(lnColumn-26)) ENDIF lcCellValue=NVL(oExcel.Range(lcExcelColumn+ALLTRIM(STR(lnRow+1))).Value,"") CATCH TO oErr MESSAGEBOX("Error encountered with Excel automation: "+ALLTRIM(oErr.message),0+64+0,_screen.Caption) lcCellValue="" ENDTRY ENDFOR ENDFOR oExcel.Workbooks.Close() RELEASE oExcel