Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CSV Column Names
Message
 
 
À
08/06/2005 13:11:11
Fred Wood
Madera Systems Consulting
Mill Valley, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01021498
Message ID:
01021502
Vues:
17
Fred,

You can fread() the first line out and count commas and look for field names.

To truly generically process a csv you'd need to construct a cursor of all memo fields, read it line by line stuffing each memo. Then you can make another pass through the cursor finding the max width of the data in the column and could then build a second cursor with fixed width fields where you can and push the first cursor content into the second.

>What would be the best way to determine if a CSV file has specific columns in it before importing it?
>
>And, is there a way to import a CSV file without knowing it's specific layout.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform