lcExistingFile = "FullPathIncludingXLSExtension" oExcel = createobject('Excel.Application') with oExcel .Workbooks.Open(lcExistingFile) with .ActiveWorkBook.ActiveSheet with .UsedRange lnColumns = .Columns.Count lnRows = .Rows.Count endwith If lnRows * lnCols <= 65000 Dimension aExcelData[lnRows,lnCols] Else Dimension aExcelData[int(65000/lnCols),lnCols] Endif For ix = 1 to lnRows For jx = 1 to lnCols aExcelData[ix, jx] = .Cells(ix,jx).Value Endfor Endfor endwith .quit && Got data into array - quit excel endwithHowever this has shortcomings like using automation to read values cell by cell. Automation is slow so do as much as you can on VFP side. There are many alternatives depending on how your data looks. A simple one is to save from excel as a DBF :
lcExistingFile = "FullPathIncludingXLSExtension" lcDBF="FullpathAndFilename_DBFToSave" #define xlDBF3 8 oExcel = createobject('Excel.Application') with oExcel .Workbooks.Open(lcExistingFile) .ActiveWorkBook.SaveAs(lcDBF, xlDBF3) && Save as a dBaseIII/Fox2x file .Quit endwithCetin