How to Export to Excel

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

How to Export to Excel

Post by mol »

Do anybody know, how to export database to excel?

Regards, Marek
Last edited by mol on Sun Nov 02, 2008 8:46 am, edited 1 time in total.
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines

Re: Export to Excel

Post by dhaine_adp »

I think the easiest way is to open MS Excel 2003 (I believed it would be the same procedure for MS Office 2007) and do:

1. File Open
2. then on file types select dBase files (*.dbf)
3. then select the file, and excel will open that file.
4. Then do save as: Microsoft Excel Workbook (*.xls)

However if the database is from two or more files you should use HB OLE to transfer the file and format them the way you like to be.
Regards,

Danny
Manila, Philippines
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to Export to Excel

Post by Rathinagiri »

You can use Harbour OLE also.

Kindly see \hmg\samples\ole\demo.prg
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to Export to Excel

Post by mol »

Many thanks for your answers,
Marek
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to Export to Excel

Post by mol »

To Rathinagiri:
I tried ole\demo.prg
It's very useful.
Can you tell mi if I can do it "silent" - without opening window with MS Excel?

Marek
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to Export to Excel

Post by Rathinagiri »

I don't know. :( Let me try.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to Export to Excel

Post by mol »

Can you help me how to open existing XLS sheet and write some data at the first empty cell in "A" column?

Don't you know where can I find something about using OLE and excel?
User avatar
bruno
Posts: 5
Joined: Wed Jul 30, 2008 11:40 pm

Re: How to Export to Excel

Post by bruno »

May be you can try using MiToprint library from jose miguel


http://www.embalajesterra.com/misdoc/ej ... NTOv23.zip


the library can export a database report to spreadsheet format

i think that a time ago Jose Miguel change to use Openoffice in place of Microsoft Office

In previous versions it use excel , may be I can find an old version for you, try it

Bruno
User avatar
bruno
Posts: 5
Joined: Wed Jul 30, 2008 11:40 pm

Re: How to Export to Excel

Post by bruno »

I have version 2.0 of MiTprinto if you like , let me know
and I send tou you by mail


Bruno
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: How to Export to Excel

Post by Rathinagiri »

I think it doesn't have the library you mention.

Please send the code to connect to Openoffice as you mentioned.

Thanks in Advance.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply