Page 1 of 1

PHP and Excel

Posted: Tue Jan 02, 2007 5:30 am
by thiscatis
Is there a way to create a PHP script so you can export data from excel into a mysql database,
or is there a better solution, maybe directly export data from excel into a db?

Posted: Tue Jan 02, 2007 5:59 am
by onion2k
There's a couple of methods. The first, and arguably easiest, is to export the data from Excel as CSV or TSV data and import that using phpMyAdmin or SQLYog or something.

Alternatively you can connect to an Excel file using PHP's ODBC functions. It's not a great interface though.

Posted: Tue Jan 02, 2007 6:03 am
by timvw
If i remember well it should be possible to install the mysql-odbc driver.. And then do the import from within excel directly... (No php needed)