>USE (JUSTSTEM(lcExcelFile)) IN 0 >>
>>LOCAL lcExcelFile >>lcExcelFile = GETFILE("XLS") >>IF NOT EMPTY(lcExcelFile) >> IMPORT FROM (lcExcelFile) XL5 && You can include SHEET TheNameOfTheSheet here >> USE (lcExcelFile) IN 0 >> BROWSE NORMAL >>ENDIF >>>>1.but i have field at my sheet as date 1/1/2005,i see it as number,
>>>LOCAL lcExcelFile >>>lcExcelFile = GETFILE("XLS") >>>IF NOT EMPTY(lcExcelFile) >>> IMPORT FROM (lcExcelFile) XL5 && You can include SHEET TheNameOfTheSheet here >>> USE (lcExcelFile) IN 0 >>> BROWSE NORMAL >>>ENDIF >>>>>>BUT you must know what column what information contains. I mean this way you can get a DBF that have fields like:
>>>LOCAL lcExcelFile, loExcel >>>lcExcelFile = GETFILE("XLS") >>>IF NOT EMPTY(lcExcelFile) >>> loExcel = CREATOBJECT("Excel.Application") >>> loExcel.Open(lcExcelFile) >>> CREATE CURSOR MyExcel (.........) && Field List of the cursor you want to import >>> WITH loExcel.ActiveWorkBook >>> FOR nRow = 1 TO .Rows.Count >>> APPEND BLANK IN MyExcel >>> FOR nCol = 1 TO .Columns.Count >>> lcField = FIELDS(nCol) >>> REPLACE (lcField) WITH .Cells(nRow, nCol).Value && With proper transformations if you needed one >>> NEXT >>> NEXT >>> ENDWITH >>>ENDIF >>>>>>