Page 3 of 5

Re: Export from Excel/CSV to DBF

Posted: Tue Feb 21, 2017 9:25 pm
by RPC
mol wrote: Tue Feb 21, 2017 6:23 am if you want to save excel file before quitting, you shoud use
oExcel:Save()
Hi mol
Thanks. It works :D . Though right now I do not require to save excel file maybe in future I might require when I convert DBF files to excel.
It is quite thoughtful of you give this command(oExcel:save()) also.

Re: Export from Excel/CSV to DBF

Posted: Tue Feb 21, 2017 9:29 pm
by RPC
Rathinagiri wrote: Tue Feb 21, 2017 6:59 am Is that an .xlsx file or .xls file?

If that is an .xlsx file, then we can use xml library to directly extract data from the file. We don't even require Excel and the process will be so fast.
Hi Rathinagiri
I can have *.xlsx file instead of *.xls file. Can you please elaborate on process of converting from *.xlsx using xml library.
Thanks

Re: Export from Excel/CSV to DBF

Posted: Tue Feb 21, 2017 9:31 pm
by RPC
Hi KDJ
Thanks for these links.
I will check them.

Re: Export from Excel/CSV to DBF

Posted: Wed Feb 22, 2017 3:06 am
by Rathinagiri
.xlsx files are simply zip files. You can uncompress them and see the contents of the directory structure and files. By Harbour XML libraries you can navigate through the data file using the tags.

Re: Export from Excel/CSV to DBF

Posted: Wed Feb 22, 2017 10:04 am
by RPC
Thanks Rathinagiri.
Can you pls provide some link/docs from where I can learn about Harbour XML libraries.

Re: Export from Excel/CSV to DBF

Posted: Wed Feb 22, 2017 10:14 am
by mol
You can download harbour source and you will find samples about xml libraries.

Re: Export from Excel/CSV to DBF

Posted: Wed Feb 22, 2017 7:42 pm
by RPC
Hi mol
Sorry couldn't find samples about xml libraries. Can you give exact path/link.
Thanks

Re: Export from Excel/CSV to DBF

Posted: Wed Feb 22, 2017 8:12 pm
by mol
I'm posting from my phone today, but I'll find it tomorrow.
I've unzipped .Xlsx file, but, it will hard work to export to this file in my opinion. There was solution to work with excel files without excel on this forum - try to search.
But - if you have excel installed, the simplest way will be using activex (IMHO :-))

Re: Export from Excel/CSV to DBF

Posted: Thu Feb 23, 2017 8:20 pm
by RPC
Hi mol
I have excel installed. I am trying to use *.xlsx because Rathinagiri said these files will be faster.
Pls post on xml libraries whenever possible for you.
Thanks

Re: Export from Excel/CSV to DBF

Posted: Thu Feb 23, 2017 8:23 pm
by mol
I'll post it tomorrow