*---------------------------
Maybe this way ...
Function Excel2DBF( cExcelName )
*------------------------------------------------------------------------*
LOCAL oExcel := nil
LOCAL oActive := nil
oExcel := TOleAuto():New( "Excel.Application" )
oExcel:WorkBooks:Open( cExcelName )
oActive := oExcel:ActiveSheet()
oExcel:DisplayAlerts := .F. // Doesn't display Excel alerts
oExcel:Visible := .F. // Do not show the excel file on screen
oExcel:ActiveWorkbook:SaveAS( cExcelName + ".CSV", 6 )
oExcel:Application:Quit()
RELEASE oActive
RELEASE oExcel
USE MyFileDBF
APPEND FROM cExcelName + ".CSV"
Msginfo("Finished!!!","Done!")
return
APPEND FROM <xcFile>
[FIELDS <idField list>]
[<scope>] [WHILE <lCondition>] [FOR <lCondition>]
[SDF | DELIMITED [WITH BLANK | <xcDelimiter>] |
[VIA <xcDriver>]]
Description
APPEND FROM adds records to the current database file from an ASCII text file or another database file. Only fields with the same names and types are APPENDed. Fields with the same name from both the current database file and xcFile must be the same data type. If they are not, a runtime error occurs when the APPEND FROM command is invoked.
Any date information in xcFile must be in the format yyyymmdd to be properly APPENDed.