>I am trying to import a simple excel file into VFP 6 - SP3 and the system crashes every time. The file is ok because I can save it as a text file and it imports fine. Any work arounds for importing Excel files or is this a known bug?
>
>Jeff
Jeff,
There was a bug in VFP for importing excel files but I don't remember what version and SP it applied. I'd first get the latest SP (5 for VFP6).
As a workaround you could save the sheet from excel as a dbf file.
#define xlDBF2 7
#define xlDBF3 8
#define xlDBF4 11
oExcel = createobject("Excel.application")
With oExcel
.Workbooks.open(lcXLSFileFullpath)
With .ActiveWorkbook
.SaveAs(lcSaveAsFullPath,xlDBF3)
.Saved = .t.
Endwith
.Quit
Endwith
Cetin