Export from Excel/CSV to DBF
Moderator: Rathinagiri
Export from Excel/CSV to DBF
Hi
Does anyone have code to export from excel or CSV format to DBF.
I found some discussion on this at one thread - viewtopic.php?f=6&t=3984 - when I tried to compile it
I get error "Error BASE/1132 Bound error: array access" ...
Called from LOAD_XLS(174)
Has anyone been able to compile it successfully ?
Alternatively I tried to use APPEND FROM command(after exporting excel file to *.CSV file) but it requires date in yyyymmdd format whereas my date is in dd/mm/yyyy format.
Anyone please advice.
Thanks
Does anyone have code to export from excel or CSV format to DBF.
I found some discussion on this at one thread - viewtopic.php?f=6&t=3984 - when I tried to compile it
I get error "Error BASE/1132 Bound error: array access" ...
Called from LOAD_XLS(174)
Has anyone been able to compile it successfully ?
Alternatively I tried to use APPEND FROM command(after exporting excel file to *.CSV file) but it requires date in yyyymmdd format whereas my date is in dd/mm/yyyy format.
Anyone please advice.
Thanks
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Export from Excel/CSV to DBF
I am sure you can use https://vivaclipper.wordpress.com/tag/hb_atokens/ hb_atokens function to import text into a two dimensional array of data. Then you can do whatever you want with that data. That includes saving in a dbf with an iterated loop.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Export from Excel/CSV to DBF
Hi RPC,
IMHO, the easiest and fastest way is to format date in the xls as yyyymmdd and export to csv and append from csv, if it is one time job.
Regards,
Anand
IMHO, the easiest and fastest way is to format date in the xls as yyyymmdd and export to csv and append from csv, if it is one time job.
Regards,
Anand
Re: Export from Excel/CSV to DBF
Thanks Rathinagiri, I will try that.Rathinagiri wrote: ↑Thu Feb 16, 2017 7:24 pm I am sure you can use https://vivaclipper.wordpress.com/tag/hb_atokens/ hb_atokens function to import text into a two dimensional array of data. Then you can do whatever you want with that data. That includes saving in a dbf with an iterated loop.
Re: Export from Excel/CSV to DBF
Anand, I need to repeatedly convert excel file to dbf file, so everytime I will have to change date format in excel file.
Thanks for your suggestion though.
Re: Export from Excel/CSV to DBF
activex is your friend !
Angel Pais
Web Apps consultant/architect/developer.
Web Apps consultant/architect/developer.
Re: Export from Excel/CSV to DBF
wiht OLE you can open book and modify/format date columns and export it to cvs.
for the code... you will have to maxro record the actions and translate VB code to harnour`s
it's no easy but is doable
HTH
Angel
for the code... you will have to maxro record the actions and translate VB code to harnour`s
it's no easy but is doable
HTH
Angel
Angel Pais
Web Apps consultant/architect/developer.
Web Apps consultant/architect/developer.
Re: Export from Excel/CSV to DBF
Excel can have date format in yyyy-mm-dd but I require date in yyyymmdd without separators.
I don't know how can that be achieved.
Thanks for your help though
I don't know how can that be achieved.
Thanks for your help though
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Export from Excel/CSV to DBF
Can you give me a sample csv file?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.