Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy more than 16K records to Excel from VFP 5.0
Message
 
 
To
28/03/2014 14:41:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 5
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Web
Miscellaneous
Thread ID:
01597567
Message ID:
01597578
Views:
46
>>TYPE CSV is not valid in 5.0. So I used DELIM. The good news is that it will copy more records, BUT when I open the delimited file in Excel 2010, I still need to change field types in the open wizard. If I leave them all as GENERAL, then 'F' translates into 'False' and '03' translates into a numeric 3. In both cases I need to change GENERAL to TEXT. Rather tedious, but that's what you get when working with old versions!
>>
>>Thanks to you and Rick!
>
>
>I missed the part about VFP 5. Sorry about that. I believe you can also save the table in a FOX2X format old-style format, and open the table directly in Excel with field names and more than 16K records.
>
>UPDATE:There's a trick you have to do to get this to work. On the FOX2X output file, you need to resize it to be its generated size less one byte. This removes the trailing ASCII-26 character. To do this:
>
>
lcFile = FILETOSTR("myfox2x.dbf")
>STRTOFILE(LEFT(lcFile, LEN(lcFile) - 1), "myfox2x.dbf")
>
>Then it will open in Excel.

FILETOSTR/STRTOFILE functions were introduced in VFP 6 as I recall.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform