Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IMPORT CSV files

Status
Not open for further replies.

gogins

IS-IT--Management
Sep 1, 2001
17
GB
Dear all

A new customer sends CSV files containing daily orders.

I would like to IMPORT these orders into a DBF file.

IMPORT does not support CSV files. It DOES support XLS files.

Is there no simple way by which one can convert programatically CSV files to XLS files (which I CAN IMPORT) without delving into complex conversion programmes? It seems so simple to edit (in Excel)a CSV file and immediately save it as an XLS file ...

The trivial alternative of asking the supplier to supply XLS files is not available.

many thanks
 
Take a look at the APPEND FROM Command in the help file.

boyd.gif

 
This is quite interesting as it seems it depends on what version of help you are looking at as to whether you get the correct information on the APPEND command for CSV!!

VFP8 help is correct

VFP6 MSDN help (or at least the version of it I have) specifies a CVS file(!!) which would obviously not work.

"Hacker's Guide to VFP6" doesn't mention the CSV parameter.

So for gogins the command is:

APPEND FROM MyFile.CSV TYPE CSV


...and remember, as it won't be obvious, the first line of the file is ignored as it assumes the field names are listed there, so if you have no filed names in your CSV file you will lose the first record of your data.

Neil

I like work. It fascinates me. I can sit and look at it for hours...
 

Fat Slag,

I have the same version, of course with the same error.


gogins,

The DBF file you would be appending to should be pre-created with the structure consistent with the structure of your CSV file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top