Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing from Excel
Message
De
13/07/1999 16:57:02
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
12/07/1999 13:17:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00240234
Message ID:
00241012
Vues:
26
>>>Yes, VFP is importing the titles from the excel sheet as the first record an then the values. I went to the excel sheet and set all cells to 'Text' since most of them were marked as general or numeric but I'm till having the problem.
>>
>>Okay, next idea is a painful one :) Make a copy of the Excel file, and start deleting columns until the import problem disappears. Then analyze the bad column to see what is peculiar about it...
>
>Thanks a lot for your assistance. Perry Forman has already gone through this and is handing me a solution. Message 240300 on this same thread.
>
>I was thinking about making excel to SAVE AS DBF. Any ideas about how to do it using automation?

It suffers the same problem that Bruce pointed out. If it has something that evaluates to a string containing a number, or a number by itself, in its first row, the column in the exported dbf will have a numeric there, no matter if all the other rows contain alpha values in that column. Of course, you're left with digits only (all characters are stripped). You may try inserting a row of your own before the first row of data and formatting it appropriately (stuffing today() where date need be, xxxxxxxxxxxxxxxxxxxxxx where you may need sufficient width for a string column etc etc), then exporting to a .dbf, and eventually deleting your added row.

Another note - the exported .dbf will have OEM codepage, not the ANSI codepage, and WILL NOT BE CODEPAGE MARKED (pick a random list of saints to mention)!!!

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform