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.