Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CSV Column Names
Message
 
 
To
08/06/2005 13:11:11
Fred Wood
Madera Systems Consulting
Mill Valley, California, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01021498
Message ID:
01021502
Views:
18
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
Previous
Reply
Map
View

Click here to load this message in the networking platform