I had recently a similar problem, solved as follows:
local cXLS_File,cDBF_File,cStem
set safety off
cXLS_File = upper(alltrim(this.cXLS_File))
if justext(cXLS_File)= ""
cXLS_File = cXLS_File+".XLS"
endif
if not file(cXLS_File)
messagebox("SPECIFIED EXCEL FILE DOES NOT EXIST",16,"ERROR")
This.etqXls.Text1.setfocus
return
endif
cStem = juststem( cXLS_File )
cDBF_File = server+ "\" + cStem+".DBF"
if file(cDBF_File)
erase (cDBF_File)
endif
if upper(type('oExcel')) = 'U'
oExcel=createobject('Excel.Application')
else
oExcel=getobject(,'Excel.Application')
endif
with oExcel
oWorkBook = .workbooks.open(cXLS_File)
.DisplayAlerts = .F.
oworkBook.SaveAs(cDBF_File,8) && saves Excel file as VFP table
oWorkBook.save
messagebox("DBF FILE GENERATED FROM EXCEL DATA",48,"ATTENTION")
.quit()
endwith
release oExcel,oWorkBook
Rafael Copquin
Treasurer - Microsoft Users Group of Argentina (MUG)
www.mug.org.ar