Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel transfer
Message
From
28/05/2002 08:32:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
28/05/2002 08:17:52
Denis Filer
University of Oxford
United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00661940
Message ID:
00661945
Views:
21
>Importing data from Excel, I have some problems:
>
>The prg attempts to sensibly rename the A B C etc Excel fields using a record selected by the user in the file i.e. with the field names. Follwing this, we often get:
>
>1. Truncation of character fields
>2. Strange behaviour of data in the DBF e.g. if you trim the data to remove leading spaces, it truncates to one character; inclusion of certain characters (Excel print features perhaps) that cause the data to disappear when selected. I am using the IMPORT FROM command type XL8.
>Any comments appreciated ... Denis

I believe you will get too much trouble importing from XLS format (in VFP). Instead, you should open Excel, and export ("Save As") from there. You can use automation, of course.

BTW, fields get truncated if the column width isn't set correctly in Excel. Make sure the column width is large enough.

Also, in one case I saw a column truncate decimals - changing the numeric format for the column resolved the issue!

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform