Hello all!
Is there any function that reads and divides CSV file into records/fields?
I have a CVS file like this:
"field1","field2","field3",,"field5",,,,"fieldx","fieldx+1","..","....",,".....",,"field y ",,,
number of fields is an fixed number.
The files comes from an phpMyadmin export.
Greetings and thx,
Serge
Read CSV file in order to APPEND in DBF file
Moderator: Rathinagiri
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Read CSV file in order to APPEND in DBF file
There's nothing you can do that can't be done...
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Read CSV file in order to APPEND in DBF file
After defined properly structure of your .dbf, you can try :
Code: Select all
APPEND FROM <cvsFileSpec> DELIMITED
Viva INTERNATIONAL HMG
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Read CSV file in order to APPEND in DBF file
Yeah, just like in the old days!
Thx,
Serge
Thx,
Serge
There's nothing you can do that can't be done...
Re: Read CSV file in order to APPEND in DBF file
I'm pursuing something very similiar. You may want to follow this:serge_girard wrote:Hello all!
Is there any function that reads and divides CSV file into records/fields?
I have a CVS file like this:
"field1","field2","field3",,"field5",,,,"fieldx","fieldx+1","..","....",,".....",,"field y ",,,
number of fields is an fixed number.
The files comes from an phpMyadmin export.
Greetings and thx,
Serge
http://hmgforum.com/viewtopic.php?f=5&t=2972&start=0
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Read CSV file in order to APPEND in DBF file
Hello Nick,
I changed the whole thing.
Instead of making an EXPORT CSV file (download->upload) I read the SQL database and then APPEND each record in a DBF file. Very fast and prettier!
Some of the SQL database fields contains comma's, quotes etc. so an APPEND from DELI SDF wasn't an option and writing code for reading byte per byte is more error sensitive.
Greetings,
Serge
I changed the whole thing.
Instead of making an EXPORT CSV file (download->upload) I read the SQL database and then APPEND each record in a DBF file. Very fast and prettier!
Some of the SQL database fields contains comma's, quotes etc. so an APPEND from DELI SDF wasn't an option and writing code for reading byte per byte is more error sensitive.
Greetings,
Serge
There's nothing you can do that can't be done...
Re: Read CSV file in order to APPEND in DBF file
My problem is different. I am reading a Primavera P6 XER export file and loading the data into a analysis system I developed. My CSV file is huge, has different line content and length and has to be reformatted before updating existing DBF records.
Glad you found a solution.
Glad you found a solution.
- serge_girard
- Posts: 3178
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Read CSV file in order to APPEND in DBF file
Nick,
not possible to make a different export file?
S
not possible to make a different export file?
S
There's nothing you can do that can't be done...
Re: Read CSV file in order to APPEND in DBF file
No, the goal is to allow the user to produce an analysis report by selecting the most inclusive export file and not having to rely on Excel or some other software. Primavera has limited export formats available.serge_girard wrote:Nick,
not possible to make a different export file?
S