View Full Version : SQL statement for export to XLS

August 11th, 2011, 12:32 AM

I have a client who wants a daily xls file of a DB from my MySQL server. I could do this manually through phpMyAdmin but would rather not.

I was trying to find the SQL statement that can be used to export the DB to an xls file. I didn't get anywhere so, I turn to you for help. How can I do this? I would like to script it and have it run on a cronjob.


August 11th, 2011, 12:38 AM
Judging by the time it takes PhpMyAdmin to generate a XLS file compared to a SQL file, I would hazard a guess that it uses some PHP to transform the data in XLS format, and not a simple SQL statement. You could look at the PhpMyAdmin code to see how it does it, or google. It gives me this http://www.hotscripts.com/forums/php/20549-export-mysql-excel.html