Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 and Excel
Message
From
16/10/2002 05:20:14
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/10/2002 18:56:19
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00711539
Message ID:
00711614
Views:
13
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform