Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to convert a Excel File to DBF file
Message
From
16/06/2005 09:35:48
James Beerbower
James Beerbower Enterprises
Hochheim Am Main, Germany
 
 
To
15/06/2005 22:57:08
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013706
Message ID:
01023920
Views:
9
Hi Derek,

if you know what the field lengths and definitions are supposed to be then an quick approach is to create a table with the fields that you want.
Then import the excel sheet into this table with the command

append from myexelfile.xls xl8 sheet "MySheet"

the second xl8 defines the type of file to be imported-- this could xl5 or xls.

This approach has the advantage that you determine exactly the data structure of the created file. It has the disadvantage that the excel spreadsheet must have exactly the columns in exactly the order you have envisioned.

Jamie Beerbower

>Dear sir
>On the other hand, how to autofit the column in the Excel file ?
>because after convert the Excel file to DBF, I find the column width
>of the fields all in same length.
>
>Please advise.
>Thanks
>
>Derek Yim
James Beerbower
James Beerbower Enterprises
Frankfurt, Deutschland
Previous
Reply
Map
View

Click here to load this message in the networking platform