Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import from CSV
Message
From
12/11/2013 03:55:09
 
 
To
11/11/2013 22:51:53
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01587817
Message ID:
01587820
Views:
60
>There is
>APPEND FROM Command
>which unlike
>IMPORT FROM Command
>assumes we know how many fields in CSV and prepared respective table with the same number of fields.
>Is there known and free piece of code ( e.g. function ) which behaves like Import for CSV. I.e. max of comas per line in a file will be calculated ,
>table with a,b,c,d... max_comas+1 columns created and populated. Seems to be quite common task.

There is the import wizard, which will analyze the selected file after you selected it in the GUI.
I often use a template of memo fields for which the max length is calculated and map later to specific target structure slightly modified.

The totally generic versions won't make use of the similarity encounterd in given files which follow similarity patterns from their source.
If you have a recurring need to read evolving files, rolling your own is best and not that difficult.
Previous
Reply
Map
View

Click here to load this message in the networking platform