Colleagues,
I am trying to convert XLS file (Excel 97-2003 format) into a DBF (dBase4 format) for future use as DBF in VFP, using MS Excel 2007 ("Home" edition). Here's the code (off a test program):
The last line is where this lil' program errs:
"OLE IDispatch exception code 0 from Micorsoft Office Excel:
Unable to get the SaveAs property of the WorkBook class.."
Searching the MS's MSDN produced only 3 hits, none of them of any help.
Could anybody here tell me where do I err?
Regards,
Ilya
I am trying to convert XLS file (Excel 97-2003 format) into a DBF (dBase4 format) for future use as DBF in VFP, using MS Excel 2007 ("Home" edition). Here's the code (off a test program):
Code:
lcXLS = "D:\SomeDir\SomeFile.XLS"
lcDBF = "D:\SomeDir\SomeFile.DBF"
loExcel = CREATEOBJECT("Excel.Application")
loWB = loExcel.WorkBooks.Open(lcXLS)
loWB.Sheets(1).Select
loWB.ActiveSheet.SaveAs(lcDBF, 11)
"OLE IDispatch exception code 0 from Micorsoft Office Excel:
Unable to get the SaveAs property of the WorkBook class.."
Searching the MS's MSDN produced only 3 hits, none of them of any help.
Could anybody here tell me where do I err?
Regards,
Ilya