Can i import a MS Excel file to php??
Well you can use ODBC, but thats a real pain, personaly if it's just a one shot deal I just export the excel data to a CSV (Comma Separated Text File) and then import it into MySQL using either the command line utils or phpMyAdmin which is much more user friendly.
Thanks a lot.
Can you tell the command or method to do so, cause i am a beginner of this.
Very thanks
Just use ODBC. Name some cells in your spreadsheet. Use PHP's ODBC pconnect to connect and then just spit SQL commands at it as if it was a mysql database.
Its actually pretty easy.
Sounds easy, and I too would like to use ODBC, but where do you get an ODBC driver for Linux?
It seems the only cross-platform solution is to maybe use Perl modules called from within PHP (the Parse::Excel module I am playing with noe as an example)
(Follow-up to my last post) I can import an Excel spreadsheet (without images) by calling a Perl script and plug the values into a multidimensional array on the fly. It seems to work pretty well, but what I am wondering is: can PHP on a *nix box use a generic ODBC/SQL call to an Excel spreadsheet to get its data, thereby eliminating the extra step (and extra server overhead) of calling an outside script to do its job?